Skip to content

Commit

Permalink
tcp/dccp: add a reschedule point in inet_csk_listen_stop()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and davem330 committed Oct 3, 2015
1 parent ef547f2 commit 92d6f17
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/inet_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 92d6f17

Please sign in to comment.