diff options
Diffstat (limited to 'net/sunrpc/auth_gss/gss_mech_switch.c')
-rw-r--r-- | net/sunrpc/auth_gss/gss_mech_switch.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c index ca8cad8251c7..782bfe1b6465 100644 --- a/net/sunrpc/auth_gss/gss_mech_switch.c +++ b/net/sunrpc/auth_gss/gss_mech_switch.c | |||
@@ -242,12 +242,13 @@ EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor); | |||
242 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr) | 242 | int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr) |
243 | { | 243 | { |
244 | struct gss_api_mech *pos = NULL; | 244 | struct gss_api_mech *pos = NULL; |
245 | int i = 0; | 245 | int j, i = 0; |
246 | 246 | ||
247 | spin_lock(®istered_mechs_lock); | 247 | spin_lock(®istered_mechs_lock); |
248 | list_for_each_entry(pos, ®istered_mechs, gm_list) { | 248 | list_for_each_entry(pos, ®istered_mechs, gm_list) { |
249 | array_ptr[i] = pos->gm_pfs->pseudoflavor; | 249 | for (j=0; j < pos->gm_pf_num; j++) { |
250 | i++; | 250 | array_ptr[i++] = pos->gm_pfs[j].pseudoflavor; |
251 | } | ||
251 | } | 252 | } |
252 | spin_unlock(®istered_mechs_lock); | 253 | spin_unlock(®istered_mechs_lock); |
253 | return i; | 254 | return i; |