aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_connection_sock.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-10-02 14:43:38 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-03 07:32:45 -0400
commit92d6f176fdcce1a9c22a59d754c924168fdf2ce4 (patch)
tree79787c724f3b6cf10af328ff62d577557a9b4b53 /net/ipv4/inet_connection_sock.c
parentef547f2ac16bd9d77a780a0e7c70857e69e8f23f (diff)
tcp/dccp: add a reschedule point in inet_csk_listen_stop()
If a listener with thousands of children in accept queue is dismantled, it can take a while to close all of them. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r--net/ipv4/inet_connection_sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 5f6e31a4aeae..89eedfbd4ad5 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -809,6 +809,7 @@ void inet_csk_listen_stop(struct sock *sk)
809 sock_put(child); 809 sock_put(child);
810 810
811 reqsk_put(req); 811 reqsk_put(req);
812 cond_resched();
812 } 813 }
813 if (queue->fastopenq.rskq_rst_head) { 814 if (queue->fastopenq.rskq_rst_head) {
814 /* Free all the reqs queued in rskq_rst_head. */ 815 /* Free all the reqs queued in rskq_rst_head. */