net: add missing data-race annotations around sk->sk_peek_off
authorEric Dumazet <edumazet@google.com>
Fri, 28 Jul 2023 15:03:16 +0000 (15:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 10:08:14 +0000 (12:08 +0200)
commitdd7a1ff07c6c741e6d56e65316f57835ed750eca
tree916e5c527a2b5e9d08de6d26b873e1687ace17db
parentb53468041d20177c8b8808d1891c0145718ceadf
net: add missing data-race annotations around sk->sk_peek_off

[ Upstream commit 11695c6e966b0ec7ed1d16777d294cef865a5c91 ]

sk_getsockopt() runs locklessly, thus we need to annotate the read
of sk->sk_peek_off.

While we are at it, add corresponding annotations to sk_set_peek_off()
and unix_set_peek_off().

Fixes: b9bb53f3836f ("sock: convert sk_peek_offset functions to WRITE_ONCE")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/core/sock.c
net/unix/af_unix.c