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>
This commit is contained in:
parent
ec409897e7
commit
013448c59b
|
@ -257,8 +257,10 @@ int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr, int size)
|
||||||
spin_lock(®istered_mechs_lock);
|
spin_lock(®istered_mechs_lock);
|
||||||
list_for_each_entry(pos, ®istered_mechs, gm_list) {
|
list_for_each_entry(pos, ®istered_mechs, gm_list) {
|
||||||
for (j = 0; j < pos->gm_pf_num; j++) {
|
for (j = 0; j < pos->gm_pf_num; j++) {
|
||||||
if (i >= size)
|
if (i >= size) {
|
||||||
|
spin_unlock(®istered_mechs_lock);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
}
|
||||||
array_ptr[i++] = pos->gm_pfs[j].pseudoflavor;
|
array_ptr[i++] = pos->gm_pfs[j].pseudoflavor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue