net: annotate data-races around sk->sk_forward_alloc
authorEric Dumazet <edumazet@google.com>
Thu, 31 Aug 2023 13:52:09 +0000 (13:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Sep 2023 06:27:33 +0000 (07:27 +0100)
commit5e6300e7b3a4ab5b72a82079753868e91fbf9efc
treec0376ce7b3667e6187785217db48aec2fd17d29a
parent66d58f046c9d3a8f996b7138d02e965fd0617de0
net: annotate data-races around sk->sk_forward_alloc

Every time sk->sk_forward_alloc is read locklessly,
add a READ_ONCE().

Add sk_forward_alloc_add() helper to centralize updates,
to reduce number of WRITE_ONCE().

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/sock.c
net/ipv4/tcp_output.c
net/ipv4/udp.c
net/mptcp/protocol.c