mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-12 01:22:11 +00:00
net: add missing data-race annotations around sk->sk_peek_off
[ Upstream commit11695c6e96
] 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:b9bb53f383
("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>
This commit is contained in:
parent
8d74fcb7cd
commit
91310a0651
2 changed files with 3 additions and 3 deletions
|
@ -717,7 +717,7 @@ static int unix_set_peek_off(struct sock *sk, int val)
|
|||
if (mutex_lock_interruptible(&u->iolock))
|
||||
return -EINTR;
|
||||
|
||||
sk->sk_peek_off = val;
|
||||
WRITE_ONCE(sk->sk_peek_off, val);
|
||||
mutex_unlock(&u->iolock);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue