diff options
Diffstat (limited to 'net/sunrpc/auth_gss/auth_gss.c')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 23c8e7c39656..976c7812bbd5 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -340,12 +340,14 @@ gss_release_msg(struct gss_upcall_msg *gss_msg) | |||
340 | } | 340 | } |
341 | 341 | ||
342 | static struct gss_upcall_msg * | 342 | static struct gss_upcall_msg * |
343 | __gss_find_upcall(struct rpc_pipe *pipe, kuid_t uid) | 343 | __gss_find_upcall(struct rpc_pipe *pipe, kuid_t uid, const struct gss_auth *auth) |
344 | { | 344 | { |
345 | struct gss_upcall_msg *pos; | 345 | struct gss_upcall_msg *pos; |
346 | list_for_each_entry(pos, &pipe->in_downcall, list) { | 346 | list_for_each_entry(pos, &pipe->in_downcall, list) { |
347 | if (!uid_eq(pos->uid, uid)) | 347 | if (!uid_eq(pos->uid, uid)) |
348 | continue; | 348 | continue; |
349 | if (auth && pos->auth->service != auth->service) | ||
350 | continue; | ||
349 | atomic_inc(&pos->count); | 351 | atomic_inc(&pos->count); |
350 | dprintk("RPC: %s found msg %p\n", __func__, pos); | 352 | dprintk("RPC: %s found msg %p\n", __func__, pos); |
351 | return pos; | 353 | return pos; |
@@ -365,7 +367,7 @@ gss_add_msg(struct gss_upcall_msg *gss_msg) | |||
365 | struct gss_upcall_msg *old; | 367 | struct gss_upcall_msg *old; |
366 | 368 | ||
367 | spin_lock(&pipe->lock); | 369 | spin_lock(&pipe->lock); |
368 | old = __gss_find_upcall(pipe, gss_msg->uid); | 370 | old = __gss_find_upcall(pipe, gss_msg->uid, gss_msg->auth); |
369 | if (old == NULL) { | 371 | if (old == NULL) { |
370 | atomic_inc(&gss_msg->count); | 372 | atomic_inc(&gss_msg->count); |
371 | list_add(&gss_msg->list, &pipe->in_downcall); | 373 | list_add(&gss_msg->list, &pipe->in_downcall); |
@@ -714,7 +716,7 @@ gss_pipe_downcall(struct file *filp, const char __user *src, size_t mlen) | |||
714 | err = -ENOENT; | 716 | err = -ENOENT; |
715 | /* Find a matching upcall */ | 717 | /* Find a matching upcall */ |
716 | spin_lock(&pipe->lock); | 718 | spin_lock(&pipe->lock); |
717 | gss_msg = __gss_find_upcall(pipe, uid); | 719 | gss_msg = __gss_find_upcall(pipe, uid, NULL); |
718 | if (gss_msg == NULL) { | 720 | if (gss_msg == NULL) { |
719 | spin_unlock(&pipe->lock); | 721 | spin_unlock(&pipe->lock); |
720 | goto err_put_ctx; | 722 | goto err_put_ctx; |