]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp: annotate data races in __tcp_oow_rate_limited()
authorEric Dumazet <edumazet@google.com>
Thu, 29 Jun 2023 16:41:50 +0000 (16:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:37:23 +0000 (08:37 +0200)
commite63dc31b9452cc0bcb2d3049baca4de4412fc12c
tree9f9c7628a1ab451b4990835535a2dcb2443c7f7c
parente9c2687988b7752b4b36754a49cc97c8e071e92a
tcp: annotate data races in __tcp_oow_rate_limited()

[ Upstream commit 998127cdb4699b9d470a9348ffe9f1154346be5f ]

request sockets are lockless, __tcp_oow_rate_limited() could be called
on the same object from different cpus. This is harmless.

Add READ_ONCE()/WRITE_ONCE() annotations to avoid a KCSAN report.

Fixes: 4ce7e93cb3fe ("tcp: rate limit ACK sent by SYN_RECV request sockets")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/tcp_input.c