Skip to content

Commit b25de36

Browse files
committed
rxrpc: Add missing unlock in rxrpc_call_accept()
Add a missing unlock in rxrpc_call_accept() in the path taken if there's no call to wake up. Signed-off-by: David Howells <[email protected]>
1 parent 33b603f commit b25de36

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

net/rxrpc/call_accept.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,11 @@ struct rxrpc_call *rxrpc_accept_call(struct rxrpc_sock *rx,
425425

426426
write_lock(&rx->call_lock);
427427

428-
ret = -ENODATA;
429-
if (list_empty(&rx->to_be_accepted))
430-
goto out;
428+
if (list_empty(&rx->to_be_accepted)) {
429+
write_unlock(&rx->call_lock);
430+
kleave(" = -ENODATA [empty]");
431+
return ERR_PTR(-ENODATA);
432+
}
431433

432434
/* check the user ID isn't already in use */
433435
pp = &rx->calls.rb_node;

0 commit comments

Comments
 (0)