aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-13 17:36:22 -0400
committerDavid Howells <dhowells@redhat.com>2016-09-13 17:36:22 -0400
commitb25de3605339c94a6c27d42efe8f7748ea206a8b (patch)
treea0b1245c763db2efdf8c92411f08d51404e668b2
parent33b603fda815faf12f66156a49b510126fac984b (diff)
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>
-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,
425 425
426 write_lock(&rx->call_lock); 426 write_lock(&rx->call_lock);
427 427
428 ret = -ENODATA; 428 if (list_empty(&rx->to_be_accepted)) {
429 if (list_empty(&rx->to_be_accepted)) 429 write_unlock(&rx->call_lock);
430 goto out; 430 kleave(" = -ENODATA [empty]");
431 return ERR_PTR(-ENODATA);
432 }
431 433
432 /* check the user ID isn't already in use */ 434 /* check the user ID isn't already in use */
433 pp = &rx->calls.rb_node; 435 pp = &rx->calls.rb_node;