summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/call_accept.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-13 23:36:22 +0200
committerDavid Howells <dhowells@redhat.com>2016-09-13 23:36:22 +0200
commitb25de3605339c94a6c27d42efe8f7748ea206a8b (patch)
treea0b1245c763db2efdf8c92411f08d51404e668b2 /net/rxrpc/call_accept.c
parentrxrpc: Requeue call for recvmsg if more data (diff)
downloadlinux-b25de3605339c94a6c27d42efe8f7748ea206a8b.tar.xz
linux-b25de3605339c94a6c27d42efe8f7748ea206a8b.zip
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 <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/call_accept.c')
-rw-r--r--net/rxrpc/call_accept.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c
index b8acec0d596e..06e328f6b0f0 100644
--- a/net/rxrpc/call_accept.c
+++ b/net/rxrpc/call_accept.c
@@ -425,9 +425,11 @@ struct rxrpc_call *rxrpc_accept_call(struct rxrpc_sock *rx,
write_lock(&rx->call_lock);
- ret = -ENODATA;
- if (list_empty(&rx->to_be_accepted))
- goto out;
+ if (list_empty(&rx->to_be_accepted)) {
+ write_unlock(&rx->call_lock);
+ kleave(" = -ENODATA [empty]");
+ return ERR_PTR(-ENODATA);
+ }
/* check the user ID isn't already in use */
pp = &rx->calls.rb_node;