Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1482812
| From | David Howells <dhowells@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next 05/10] rxrpc: Add missing unlock in rxrpc_call_accept() |
| Date | 2016-09-14 00:30 +0200 |
| Message-ID | <sh4ng-823-7@gated-at.bofh.it> (permalink) |
| References | <sh4nf-823-3@gated-at.bofh.it> |
| Organization | Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 |
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;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 00/10] rxrpc: Miscellaneous fixes David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 05/10] rxrpc: Add missing unlock in rxrpc_call_accept() David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 01/10] rxrpc: Make sure we initialise the peer hash key David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 03/10] rxrpc: The IDLE ACK packet should use rxrpc_idle_ack_delay David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 10/10] rxrpc: Correctly initialise, limit and transmit call->rx_winsize David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 06/10] rxrpc: Use skb->len not skb->data_len David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 04/10] rxrpc: Requeue call for recvmsg if more data David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 09/10] rxrpc: Fix prealloc refcounting David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 08/10] rxrpc: Adjust the call ref tracepoint to show kernel API refs David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 [PATCH net-next 07/10] rxrpc: Allow tx_winsize to grow in response to an ACK David Howells <dhowells@redhat.com> - 2016-09-14 00:30 +0200 Re: [PATCH net-next 00/10] rxrpc: Miscellaneous fixes David Miller <davem@davemloft.net> - 2016-09-16 08:00 +0200
csiph-web