diff options
Diffstat (limited to 'net/sunrpc/auth_gss/auth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index fcac5d141717..084656671d6e 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -1075,6 +1075,15 @@ gss_destroy(struct rpc_auth *auth) | |||
1075 | kref_put(&gss_auth->kref, gss_free_callback); | 1075 | kref_put(&gss_auth->kref, gss_free_callback); |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | /* | ||
1079 | * Auths may be shared between rpc clients that were cloned from a | ||
1080 | * common client with the same xprt, if they also share the flavor and | ||
1081 | * target_name. | ||
1082 | * | ||
1083 | * The auth is looked up from the oldest parent sharing the same | ||
1084 | * cl_xprt, and the auth itself references only that common parent | ||
1085 | * (which is guaranteed to last as long as any of its descendants). | ||
1086 | */ | ||
1078 | static struct gss_auth * | 1087 | static struct gss_auth * |
1079 | gss_auth_find_or_add_hashed(struct rpc_auth_create_args *args, | 1088 | gss_auth_find_or_add_hashed(struct rpc_auth_create_args *args, |
1080 | struct rpc_clnt *clnt, | 1089 | struct rpc_clnt *clnt, |
@@ -1088,6 +1097,8 @@ gss_auth_find_or_add_hashed(struct rpc_auth_create_args *args, | |||
1088 | gss_auth, | 1097 | gss_auth, |
1089 | hash, | 1098 | hash, |
1090 | hashval) { | 1099 | hashval) { |
1100 | if (gss_auth->client != clnt) | ||
1101 | continue; | ||
1091 | if (gss_auth->rpc_auth.au_flavor != args->pseudoflavor) | 1102 | if (gss_auth->rpc_auth.au_flavor != args->pseudoflavor) |
1092 | continue; | 1103 | continue; |
1093 | if (gss_auth->target_name != args->target_name) { | 1104 | if (gss_auth->target_name != args->target_name) { |