net: annotate sk->sk_rcvlowat lockless reads
sock_rcvlowat() or int_sk_rcvlowat() might be called without the socket lock for example from tcp_poll(). Use READ_ONCE() to document the fact that other cpus might change sk->sk_rcvlowat under us and avoid KCSAN splats. Use WRITE_ONCE() on write sides too. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
This commit is contained in:

committed by
Jakub Kicinski

parent
8265792bf8
commit
eac66402d1
@@ -554,7 +554,7 @@ META_COLLECTOR(int_sk_rcvlowat)
|
||||
*err = -1;
|
||||
return;
|
||||
}
|
||||
dst->value = sk->sk_rcvlowat;
|
||||
dst->value = READ_ONCE(sk->sk_rcvlowat);
|
||||
}
|
||||
|
||||
META_COLLECTOR(int_sk_rcvtimeo)
|
||||
|
Reference in New Issue
Block a user