tcp: annotate data-race around queue->synflood_warned
Subsystems (3)
PATCH 1/1 tcp: annotate data-race around queue->synflood_warned
Annotate the lockless read of queue->synflood_warned.
Following xchg() has the needed data-race resolution.
Signed-off-by Eric Dumazet <[email protected]>
--- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_input.c +1 -1
@@ -6841,7 +6841,7 @@ static bool tcp_syn_flood_action(const struct sock *sk, const char *proto)#endif __NET_INC_STATS (sock_net (sk),LINUX_MIB_TCPREQQFULLDROP ); -if (!queue->synflood_warned && syncookies !=2 && +if (!READ_ONCE (queue->synflood_warned) && syncookies !=2 &&xchg (&queue->synflood_warned,1 ) ==0 ) {if (IS_ENABLED (CONFIG_IPV6 ) && sk->sk_family ==AF_INET6 ) { net_info_ratelimited("%s: Possible SYN flooding on port [%pI6c]:%u. %s.\n",
Signature · 1 line
2.38.1.431.g37b22c650d-goog
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 8 lines · On Tue, 15 Nov 2022 09:18:51 +0000 you wrote:
Annotate the lockless read of
queue->synflood_warned.Following
xchg()has the needed data-race resolution.Signed-off-by Eric Dumazet <[email protected]>--- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net-next] tcp: annotate data-race around queue->synflood_warned
https://git.kernel.org/netdev/net-next/c/bf36267e3ad3
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html