]> git.baikalelectronics.ru Git - kernel.git/commit
net: annotate sk->sk_rcvlowat lockless reads
authorEric Dumazet <edumazet@google.com>
Wed, 9 Oct 2019 22:32:35 +0000 (15:32 -0700)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 10 Oct 2019 04:43:00 +0000 (21:43 -0700)
commit2eb4231d46dbe8c1402b41cf2ff28cb5b1b47c5f
treed25d4b62d8f9a01ed18b820307bfb0080a26a28f
parenta43ecfa6ef45bbb204369065b592c2df8168eaac
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>
include/net/sock.h
net/core/filter.c
net/core/sock.c
net/ipv4/tcp.c
net/sched/em_meta.c