Commit 03a6c822 authored by David Howells's avatar David Howells

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: default avatarDavid Howells <dhowells@redhat.com>
parent 1d3b78bb
...@@ -619,8 +619,8 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len) ...@@ -619,8 +619,8 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
/* The socket is now unlocked. */ /* The socket is now unlocked. */
if (IS_ERR(call)) if (IS_ERR(call))
return PTR_ERR(call); return PTR_ERR(call);
rxrpc_put_call(call, rxrpc_call_put); ret = 0;
return 0; goto out_put_unlock;
} }
call = rxrpc_find_call_by_user_ID(rx, p.user_call_ID); 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) ...@@ -689,6 +689,7 @@ int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
ret = rxrpc_send_data(rx, call, msg, len, NULL); ret = rxrpc_send_data(rx, call, msg, len, NULL);
} }
out_put_unlock:
mutex_unlock(&call->user_mutex); mutex_unlock(&call->user_mutex);
error_put: error_put:
rxrpc_put_call(call, rxrpc_call_put); rxrpc_put_call(call, rxrpc_call_put);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment