diff options
author | Florian Westphal <fw@strlen.de> | 2024-06-06 17:11:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-06-10 11:54:18 +0100 |
commit | c75ad7c759ccead1be462d4cec42bd4ad3578989 (patch) | |
tree | 6f3be2134a87431e4bdbd3b3537f80cd3c615290 /net/dccp | |
parent | b334b924c9b709bc969644fb5c406f5c9d01dceb (diff) | |
download | linux-c75ad7c759ccead1be462d4cec42bd4ad3578989.tar.gz linux-c75ad7c759ccead1be462d4cec42bd4ad3578989.tar.bz2 linux-c75ad7c759ccead1be462d4cec42bd4ad3578989.zip |
net: tcp: un-pin the tw_timer
After previous patch, even if timer fires immediately on another CPU,
context that schedules the timer now holds the ehash spinlock, so timer
cannot reap tw socket until ehash lock is released.
BH disable is moved into hashdance_schedule.
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/minisocks.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c index deb52d7d31b4..fecc8190064f 100644 --- a/net/dccp/minisocks.c +++ b/net/dccp/minisocks.c @@ -54,16 +54,10 @@ void dccp_time_wait(struct sock *sk, int state, int timeo) if (state == DCCP_TIME_WAIT) timeo = DCCP_TIMEWAIT_LEN; - /* tw_timer is pinned, so we need to make sure BH are disabled - * in following section, otherwise timer handler could run before - * we complete the initialization. - */ - local_bh_disable(); /* Linkage updates. * Note that access to tw after this point is illegal. */ inet_twsk_hashdance_schedule(tw, sk, &dccp_hashinfo, timeo); - local_bh_enable(); } else { /* Sorry, if we're out of memory, just CLOSE this * socket up. We've got bigger problems than |