From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: dhowells@redhat.com, linux-afs@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next 05/10] rxrpc: Add missing unlock in rxrpc_call_accept()
Date: Tue, 13 Sep 2016 23:21:30 +0100 [thread overview]
Message-ID: <147380529065.23135.14835990321667645327.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <147380525614.23135.7539695651371953351.stgit@warthog.procyon.org.uk>
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>
---
net/rxrpc/call_accept.c | 8 +++++---
1 file 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;
next prev parent reply other threads:[~2016-09-13 22:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-13 22:20 [PATCH net-next 00/10] rxrpc: Miscellaneous fixes David Howells
2016-09-13 22:21 ` [PATCH net-next 01/10] rxrpc: Make sure we initialise the peer hash key David Howells
2016-09-13 22:21 ` [PATCH net-next 02/10] rxrpc: Add missing wakeup on Tx window rotation David Howells
2016-09-13 22:21 ` [PATCH net-next 03/10] rxrpc: The IDLE ACK packet should use rxrpc_idle_ack_delay David Howells
2016-09-13 22:21 ` [PATCH net-next 04/10] rxrpc: Requeue call for recvmsg if more data David Howells
2016-09-13 22:21 ` David Howells [this message]
2016-09-13 22:21 ` [PATCH net-next 06/10] rxrpc: Use skb->len not skb->data_len David Howells
2016-09-13 22:21 ` [PATCH net-next 07/10] rxrpc: Allow tx_winsize to grow in response to an ACK David Howells
2016-09-13 22:21 ` [PATCH net-next 08/10] rxrpc: Adjust the call ref tracepoint to show kernel API refs David Howells
2016-09-13 22:21 ` [PATCH net-next 09/10] rxrpc: Fix prealloc refcounting David Howells
2016-09-13 22:22 ` [PATCH net-next 10/10] rxrpc: Correctly initialise, limit and transmit call->rx_winsize David Howells
2016-09-16 5:55 ` [PATCH net-next 00/10] rxrpc: Miscellaneous fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=147380529065.23135.14835990321667645327.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).