* [PATCH net] rxrpc: Fix user call ID check in rxrpc_service_prealloc_one
@ 2018-08-01 12:27 David Howells
2018-08-01 18:52 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2018-08-01 12:27 UTC (permalink / raw)
To: netdev; +Cc: dhowells, linux-afs, linux-kernel
From: YueHaibing <yuehaibing@huawei.com>
There just check the user call ID isn't already in use, hence should
compare user_call_ID with xcall->user_call_ID, which is current
node's user_call_ID.
Fixes: 540b1c48c37a ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg")
Suggested-by: David Howells <dhowells@redhat.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---
net/rxrpc/call_accept.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c
index a9a9be5519b9..9d1e298b784c 100644
--- a/net/rxrpc/call_accept.c
+++ b/net/rxrpc/call_accept.c
@@ -116,9 +116,9 @@ static int rxrpc_service_prealloc_one(struct rxrpc_sock *rx,
while (*pp) {
parent = *pp;
xcall = rb_entry(parent, struct rxrpc_call, sock_node);
- if (user_call_ID < call->user_call_ID)
+ if (user_call_ID < xcall->user_call_ID)
pp = &(*pp)->rb_left;
- else if (user_call_ID > call->user_call_ID)
+ else if (user_call_ID > xcall->user_call_ID)
pp = &(*pp)->rb_right;
else
goto id_in_use;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] rxrpc: Fix user call ID check in rxrpc_service_prealloc_one
2018-08-01 12:27 [PATCH net] rxrpc: Fix user call ID check in rxrpc_service_prealloc_one David Howells
@ 2018-08-01 18:52 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-08-01 18:52 UTC (permalink / raw)
To: dhowells; +Cc: netdev, linux-afs, linux-kernel
From: David Howells <dhowells@redhat.com>
Date: Wed, 01 Aug 2018 13:27:23 +0100
> From: YueHaibing <yuehaibing@huawei.com>
>
> There just check the user call ID isn't already in use, hence should
> compare user_call_ID with xcall->user_call_ID, which is current
> node's user_call_ID.
>
> Fixes: 540b1c48c37a ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg")
> Suggested-by: David Howells <dhowells@redhat.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Signed-off-by: David Howells <dhowells@redhat.com>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-01 18:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 12:27 [PATCH net] rxrpc: Fix user call ID check in rxrpc_service_prealloc_one David Howells
2018-08-01 18:52 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.