diff options
author | Eric Dumazet <edumazet@google.com> | 2019-10-10 00:32:35 +0200 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-10-10 06:43:00 +0200 |
commit | eac66402d1c342f07ff38f8d631ff95eb7ad3220 (patch) | |
tree | d25d4b62d8f9a01ed18b820307bfb0080a26a28f /net/sched/em_meta.c | |
parent | net: silence KCSAN warnings around sk_add_backlog() calls (diff) | |
download | linux-eac66402d1c342f07ff38f8d631ff95eb7ad3220.tar.xz linux-eac66402d1c342f07ff38f8d631ff95eb7ad3220.zip |
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>
Diffstat (limited to 'net/sched/em_meta.c')
-rw-r--r-- | net/sched/em_meta.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index 82bd14e7ac93..4c9122fc35c9 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c @@ -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) |