From: Eric Dumazet Date: Fri, 2 Oct 2015 18:43:38 +0000 (-0700) Subject: tcp/dccp: add a reschedule point in inet_csk_listen_stop() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=92d6f176fdcce1a9c22a59d754c924168fdf2ce4;p=linux-beck.git 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 Signed-off-by: David S. Miller --- 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) sock_put(child); reqsk_put(req); + cond_resched(); } if (queue->fastopenq.rskq_rst_head) { /* Free all the reqs queued in rskq_rst_head. */