Skip to content

Commit 03a6c82

Browse files
committed
rxrpc: The mutex lock returned by rxrpc_accept_call() needs releasing
The caller of rxrpc_accept_call() must release the lock on call->user_mutex returned by that function. Signed-off-by: David Howells <dhowells@redhat.com>
1 parent 1d3b78b commit 03a6c82

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎net/rxrpc/sendmsg.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,8 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
619619
/* The socket is now unlocked. */
620620
if (IS_ERR(call))
621621
return PTR_ERR(call);
622-
rxrpc_put_call(call, rxrpc_call_put);
623-
return 0;
622+
ret = 0;
623+
goto out_put_unlock;
624624
}
625625

626626
call = rxrpc_find_call_by_user_ID(rx, p.user_call_ID);
@@ -689,6 +689,7 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
689689
ret = rxrpc_send_data(rx, call, msg, len, NULL);
690690
}
691691

692+
out_put_unlock:
692693
mutex_unlock(&call->user_mutex);
693694
error_put:
694695
rxrpc_put_call(call, rxrpc_call_put);

0 commit comments

Comments
 (0)