aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2014-05-18 13:47:14 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-05-18 13:47:14 -0400
commit7a9a7b774fd543467313894fe53bc7dcc47d5708 (patch)
tree2b5441b6117ca18162fc44ec32f953be97297646 /net/sunrpc
parent1f2edbe3fe2111a59fcd1bb3b9725066bc9ed686 (diff)
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: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth_gss/gss_mech_switch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c
index 27ce26240932..92d5ab99fbf3 100644
--- a/net/sunrpc/auth_gss/gss_mech_switch.c
+++ b/net/sunrpc/auth_gss/gss_mech_switch.c
@@ -218,10 +218,8 @@ static struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
218 218
219 spin_lock(&registered_mechs_lock); 219 spin_lock(&registered_mechs_lock);
220 list_for_each_entry(pos, &registered_mechs, gm_list) { 220 list_for_each_entry(pos, &registered_mechs, gm_list) {
221 if (!mech_supports_pseudoflavor(pos, pseudoflavor)) { 221 if (!mech_supports_pseudoflavor(pos, pseudoflavor))
222 module_put(pos->gm_owner);
223 continue; 222 continue;
224 }
225 if (try_module_get(pos->gm_owner)) 223 if (try_module_get(pos->gm_owner))
226 gm = pos; 224 gm = pos;
227 break; 225 break;