Commit 7a9a7b77 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Fix a module reference issue in rpcsec_gss

We're not taking a reference in the case where _gss_mech_get_by_pseudoflavor
loops without finding the correct rpcsec_gss flavour, so why are we
releasing it?
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 1f2edbe3
...@@ -218,10 +218,8 @@ static struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor) ...@@ -218,10 +218,8 @@ static struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
spin_lock(&registered_mechs_lock); spin_lock(&registered_mechs_lock);
list_for_each_entry(pos, &registered_mechs, gm_list) { list_for_each_entry(pos, &registered_mechs, gm_list) {
if (!mech_supports_pseudoflavor(pos, pseudoflavor)) { if (!mech_supports_pseudoflavor(pos, pseudoflavor))
module_put(pos->gm_owner);
continue; continue;
}
if (try_module_get(pos->gm_owner)) if (try_module_get(pos->gm_owner))
gm = pos; gm = pos;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment