]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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 09:33:55 +0000 (11:33 +0200)
commit46ca66e811f18c7d3970104b9769a9f19dd0f111
treea589a9613372786a67f084bf5cca35e9c06d6c48
parenta625b885c6d8b9ac14f2ffbf529470f979d618a0
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