tcp: Don't reinitialise tw->tw_transparent in tcp_time_wait().
Subsystems (3)
Kuniyuki Iwashima
reviewerPATCH 1/1 tcp: Don't reinitialise tw->tw_transparent in tcp_time_wait().
tw->tw_transparent is initialised twice in inet_twsk_alloc() and tcp_time_wait().
Let's remove the latter.
--- net/ipv4/tcp_minisocks.c | 1 - 1 file changed, 1 deletion(-)
net/ipv4/tcp_minisocks.c +0 -1
@@ -337,7 +337,6 @@ void tcp_time_wait(struct sock *sk, int state, int timeo)struct tcp_timewait_sock *tcptw =tcp_twsk ((struct sock *)tw);const int rto = (icsk->icsk_rto <<2 ) - (icsk->icsk_rto >>1 ); - tw->tw_transparent =inet_test_bit (TRANSPARENT , sk); tw->tw_mark = sk->sk_mark; tw->tw_priority =READ_ONCE (sk->sk_priority); tw->tw_rcv_wscale = tp->rx_opt.rcv_wscale;
Signature · 1 line
2.52.0.rc1.455.g30608eb744-goog
Quoted 7 lines · Kuniyuki Iwashima
tw->tw_transparentis initialised twice ininet_twsk_alloc()andtcp_time_wait().Let's remove the latter.
Signed-off-by Kuniyuki Iwashima <[email protected]>
Thanks,
Jason
Jakub Kicinski
maintainerQuoted 4 lines · On Tue, 18 Nov 2025 00:04:40 +0000 Kuniyuki Iwashima wrote:
tw->tw_transparentis initialised twice ininet_twsk_alloc()andtcp_time_wait().Let's remove the latter.
Coincidentally looks like inet_twsk_alloc() can be static
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 18 Nov 2025 00:04:40 +0000 you wrote:
tw->tw_transparentis initialised twice ininet_twsk_alloc()andtcp_time_wait().Let's remove the latter.
Signed-off-by Kuniyuki Iwashima <[email protected]>[...]
Here is the summary with links:
- [v1,net-next] tcp: Don't reinitialise tw->tw_transparent in tcp_time_wait().
https://git.kernel.org/netdev/net-next/c/932478bf9f6d
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html