From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
mleitner@redhat.com, juri.lelli@redhat.com, vschneid@redhat.com,
tglozar@redhat.com, dsahern@kernel.org, bigeasy@linutronix.de,
tglx@linutronix.de
Subject: [PATCH net-next v6 2/3] net: tcp: un-pin the tw_timer
Date: Mon, 3 Jun 2024 11:36:11 +0200 [thread overview]
Message-ID: <20240603093625.4055-3-fw@strlen.de> (raw)
In-Reply-To: <20240603093625.4055-1-fw@strlen.de>
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.
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/ipv4/inet_timewait_sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index 2b1d836df64e..66d9b76595b7 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -213,7 +213,7 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,
tw->tw_prot = sk->sk_prot_creator;
atomic64_set(&tw->tw_cookie, atomic64_read(&sk->sk_cookie));
twsk_net_set(tw, sock_net(sk));
- timer_setup(&tw->tw_timer, tw_timer_handler, TIMER_PINNED);
+ timer_setup(&tw->tw_timer, tw_timer_handler, 0);
/*
* Because we use RCU lookups, we should not set tw_refcnt
* to a non null value before everything is setup for this
--
2.44.2
next prev parent reply other threads:[~2024-06-03 9:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-03 9:36 [PATCH net-next v6 0/3] net: tcp: un-pin tw timer Florian Westphal
2024-06-03 9:36 ` [PATCH net-next v6 1/3] net: tcp/dcpp: prepare for tw_timer un-pinning Florian Westphal
2024-06-03 10:30 ` Eric Dumazet
2024-06-03 11:21 ` Florian Westphal
2024-06-03 11:53 ` Eric Dumazet
2024-06-03 12:10 ` Sebastian Andrzej Siewior
2024-06-03 13:31 ` Florian Westphal
2024-06-03 13:50 ` Eric Dumazet
2024-06-03 10:53 ` shaozhengchao
2024-06-03 9:36 ` Florian Westphal [this message]
2024-06-03 9:36 ` [PATCH net-next v6 3/3] tcp: move inet_twsk_schedule helper out of header Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240603093625.4055-3-fw@strlen.de \
--to=fw@strlen.de \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=juri.lelli@redhat.com \
--cc=kuba@kernel.org \
--cc=mleitner@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tglozar@redhat.com \
--cc=tglx@linutronix.de \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).