aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-17 05:49:11 -0400
committerDavid Howells <dhowells@redhat.com>2016-09-17 05:51:54 -0400
commit0360da6db7d6390e7bd2f6c93b01af29bcd36ad5 (patch)
tree0366bddbebf16022d37346d561c970cca200da77 /net
parente6f3afb3fc058e17b407b6f7cac08058b19e641c (diff)
rxrpc: Purge the to_be_accepted queue on socket release
Purge the queue of to_be_accepted calls on socket release. Note that purging sock_calls doesn't release the ref owned by to_be_accepted. Probably the sock_calls list is redundant given a purges of the recvmsg_q, the to_be_accepted queue and the calls tree. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/rxrpc/call_object.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index 22f9b0d1a138..b0ffbd9664e6 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -476,6 +476,16 @@ void rxrpc_release_calls_on_socket(struct rxrpc_sock *rx)
476 476
477 _enter("%p", rx); 477 _enter("%p", rx);
478 478
479 while (!list_empty(&rx->to_be_accepted)) {
480 call = list_entry(rx->to_be_accepted.next,
481 struct rxrpc_call, accept_link);
482 list_del(&call->accept_link);
483 rxrpc_abort_call("SKR", call, 0, RX_CALL_DEAD, ECONNRESET);
484 rxrpc_send_call_packet(call, RXRPC_PACKET_TYPE_ABORT);
485 rxrpc_release_call(rx, call);
486 rxrpc_put_call(call, rxrpc_call_put);
487 }
488
479 while (!list_empty(&rx->sock_calls)) { 489 while (!list_empty(&rx->sock_calls)) {
480 call = list_entry(rx->sock_calls.next, 490 call = list_entry(rx->sock_calls.next,
481 struct rxrpc_call, sock_link); 491 struct rxrpc_call, sock_link);