Skip to content

Commit 92d6f17

Browse files
Eric Dumazetdavem330
Eric Dumazet
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ef547f2 commit 92d6f17

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ipv4/inet_connection_sock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,7 @@ void inet_csk_listen_stop(struct sock *sk)
809809
sock_put(child);
810810

811811
reqsk_put(req);
812+
cond_resched();
812813
}
813814
if (queue->fastopenq.rskq_rst_head) {
814815
/* Free all the reqs queued in rskq_rst_head. */

0 commit comments

Comments
 (0)