Re: [PATCH net] net: annotate sk->sk_rcvlowat lockless reads

2019-10-09 Thread Jakub Kicinski
On Wed, 9 Oct 2019 15:32:35 -0700, Eric Dumazet wrote: > 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 WR

[PATCH net] net: annotate sk->sk_rcvlowat lockless reads

2019-10-09 Thread Eric Dumazet
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 --- incl