diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2017-02-07 21:46:39 +0800 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-02-08 17:02:45 -0500 |
commit | 2864486bd0fdd14431058650c91fcb9fba605d43 (patch) | |
tree | 4c3445f2d7e1d7f05f15e77e33d0628ee2acdf1f /net | |
parent | 600424e3d91be7c6c8c38b95db713983a6307efa (diff) | |
download | linux-stable-2864486bd0fdd14431058650c91fcb9fba605d43.tar.gz linux-stable-2864486bd0fdd14431058650c91fcb9fba605d43.tar.bz2 linux-stable-2864486bd0fdd14431058650c91fcb9fba605d43.zip |
sunrpc: error out if register_shrinker fail
register_shrinker may return error when register fail, error out.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/auth.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index d8f17ea7932e..8b344d0eb6ed 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -878,8 +878,12 @@ int __init rpcauth_init_module(void) err = rpc_init_generic_auth(); if (err < 0) goto out2; - register_shrinker(&rpc_cred_shrinker); + err = register_shrinker(&rpc_cred_shrinker); + if (err < 0) + goto out3; return 0; +out3: + rpc_destroy_generic_auth(); out2: rpc_destroy_authunix(); out1: |