diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-17 14:47:30 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-17 17:02:57 -0400 |
commit | 013448c59b8a8cf71a5ff89641f78b620671ccb0 (patch) | |
tree | 60b6918d120e7ef00da6d650efed1717b9bd9762 /net/sunrpc | |
parent | ec409897e7c71596cc080135ef5f86b81a0e9813 (diff) |
SUNRPC: Add a missing spin_unlock to gss_mech_list_pseudoflavors
The patch "SUNRPC: Add rpcauth_list_flavors()" introduces a new error
path in gss_mech_list_pseudoflavors, but fails to release the spin lock.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth_gss/gss_mech_switch.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index 6ac5dfcd2928..b174fcd9ff4c 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c | |||
@@ -257,8 +257,10 @@ int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr, int size) | |||
257 | spin_lock(®istered_mechs_lock); | 257 | spin_lock(®istered_mechs_lock); |
258 | list_for_each_entry(pos, ®istered_mechs, gm_list) { | 258 | list_for_each_entry(pos, ®istered_mechs, gm_list) { |
259 | for (j = 0; j < pos->gm_pf_num; j++) { | 259 | for (j = 0; j < pos->gm_pf_num; j++) { |
260 | if (i >= size) | 260 | if (i >= size) { |
261 | spin_unlock(®istered_mechs_lock); | ||
261 | return -ENOMEM; | 262 | return -ENOMEM; |
263 | } | ||
262 | array_ptr[i++] = pos->gm_pfs[j].pseudoflavor; | 264 | array_ptr[i++] = pos->gm_pfs[j].pseudoflavor; |
263 | } | 265 | } |
264 | } | 266 | } |