Commit c78d6119 authored by Eric Dumazet's avatar Eric Dumazet Committed by sanglipeng
Browse files

net: add missing data-race annotations around sk->sk_peek_off

stable inclusion
from stable-v5.10.190
commit ad417bab9d5b0bb5d8c24423c8d80beb5858bd08
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I928UI

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ad417bab9d5b0bb5d8c24423c8d80beb5858bd08



--------------------------------

[ Upstream commit 11695c6e ]

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: b9bb53f3 ("sock: convert sk_peek_offset functions to WRITE_ONCE")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 9a651a01
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment