net: annotate data-race around sk->sk_txrehash
authorEric Dumazet <edumazet@google.com>
Fri, 28 Jul 2023 15:03:09 +0000 (15:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 10:08:13 +0000 (12:08 +0200)
commit0317c8322d9ac86a2bf251f94efc7fe96643e0fb
tree8ca4d9ede5696e7e93ff0c3b80ee6a893cfac17f
parent60d92bc9c0940a8492a025b54224b6f063932736
net: annotate data-race around sk->sk_txrehash

[ Upstream commit c76a0328899bbe226f8adeb88b8da9e4167bd316 ]

sk_getsockopt() runs locklessly. This means sk->sk_txrehash
can be read while other threads are changing its value.

Other locations were handled in commit cb6cd2cec799
("tcp: Change SYN ACK retransmit behaviour to account for rehash")

Fixes: 26859240e4ee ("txhash: Add socket option to control TX hash rethink behavior")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Akhmat Karakotov <hmukos@yandex-team.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/sock.c