Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6cb3ece9 authored by David Howells's avatar David Howells Committed by David S. Miller
Browse files

rxrpc: Don't release call mutex on error pointer



Don't release call mutex at the end of rxrpc_kernel_begin_call() if the
call pointer actually holds an error value.

Fixes: 540b1c48 ("rxrpc: Fix deadlock between call creation and sendmsg/recvmsg")
Reported-by: default avatarMarc Dionne <marc.dionne@auristor.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 748759d5
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -308,10 +308,11 @@ struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock,
	call = rxrpc_new_client_call(rx, &cp, srx, user_call_ID, tx_total_len,
				     gfp);
	/* The socket has been unlocked. */
	if (!IS_ERR(call))
	if (!IS_ERR(call)) {
		call->notify_rx = notify_rx;

		mutex_unlock(&call->user_mutex);
	}

	_leave(" = %p", call);
	return call;
}