| .. | .. |
|---|
| 301 | 301 | list_for_each_entry(pos, &pipe->in_downcall, list) { |
|---|
| 302 | 302 | if (!uid_eq(pos->uid, uid)) |
|---|
| 303 | 303 | continue; |
|---|
| 304 | | - if (auth && pos->auth->service != auth->service) |
|---|
| 304 | + if (pos->auth->service != auth->service) |
|---|
| 305 | 305 | continue; |
|---|
| 306 | 306 | refcount_inc(&pos->count); |
|---|
| 307 | 307 | return pos; |
|---|
| .. | .. |
|---|
| 685 | 685 | return err; |
|---|
| 686 | 686 | } |
|---|
| 687 | 687 | |
|---|
| 688 | +static struct gss_upcall_msg * |
|---|
| 689 | +gss_find_downcall(struct rpc_pipe *pipe, kuid_t uid) |
|---|
| 690 | +{ |
|---|
| 691 | + struct gss_upcall_msg *pos; |
|---|
| 692 | + list_for_each_entry(pos, &pipe->in_downcall, list) { |
|---|
| 693 | + if (!uid_eq(pos->uid, uid)) |
|---|
| 694 | + continue; |
|---|
| 695 | + if (!rpc_msg_is_inflight(&pos->msg)) |
|---|
| 696 | + continue; |
|---|
| 697 | + refcount_inc(&pos->count); |
|---|
| 698 | + return pos; |
|---|
| 699 | + } |
|---|
| 700 | + return NULL; |
|---|
| 701 | +} |
|---|
| 702 | + |
|---|
| 688 | 703 | #define MSG_BUF_MAXSIZE 1024 |
|---|
| 689 | 704 | |
|---|
| 690 | 705 | static ssize_t |
|---|
| .. | .. |
|---|
| 731 | 746 | err = -ENOENT; |
|---|
| 732 | 747 | /* Find a matching upcall */ |
|---|
| 733 | 748 | spin_lock(&pipe->lock); |
|---|
| 734 | | - gss_msg = __gss_find_upcall(pipe, uid, NULL); |
|---|
| 749 | + gss_msg = gss_find_downcall(pipe, uid); |
|---|
| 735 | 750 | if (gss_msg == NULL) { |
|---|
| 736 | 751 | spin_unlock(&pipe->lock); |
|---|
| 737 | 752 | goto err_put_ctx; |
|---|