Skip to content

Commit c01f6c9

Browse files
YueHaibingdavem330
authored andcommitted
rxrpc: Fix user call ID check in rxrpc_service_prealloc_one
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: 540b1c4 ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg") Suggested-by: David Howells <[email protected]> Signed-off-by: YueHaibing <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a94c689 commit c01f6c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/rxrpc/call_accept.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ static int rxrpc_service_prealloc_one(struct rxrpc_sock *rx,
116116
while (*pp) {
117117
parent = *pp;
118118
xcall = rb_entry(parent, struct rxrpc_call, sock_node);
119-
if (user_call_ID < call->user_call_ID)
119+
if (user_call_ID < xcall->user_call_ID)
120120
pp = &(*pp)->rb_left;
121-
else if (user_call_ID > call->user_call_ID)
121+
else if (user_call_ID > xcall->user_call_ID)
122122
pp = &(*pp)->rb_right;
123123
else
124124
goto id_in_use;

0 commit comments

Comments
 (0)