tcp: annotate sk->sk_wmem_queued lockless reads
authorEric Dumazet <edumazet@google.com>
Fri, 11 Oct 2019 03:17:46 +0000 (20:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Oct 2019 17:13:08 +0000 (10:13 -0700)
commitab4e846a82d0ae00176de19f2db3c5c64f8eb5f2
tree7be26ef02ab2f2979be9a3cdeb36ed1bafc51354
parente292f05e0df73f9fcc93329663936e1ded97a988
tcp: annotate sk->sk_wmem_queued lockless reads

For the sake of tcp_poll(), there are few places where we fetch
sk->sk_wmem_queued while this field can change from IRQ or other cpu.

We need to add READ_ONCE() annotations, and also make sure write
sides use corresponding WRITE_ONCE() to avoid store-tearing.

sk_wmem_queued_add() helper is added so that we can in
the future convert to ADD_ONCE() or equivalent if/when
available.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
include/trace/events/sock.h
net/core/datagram.c
net/core/sock.c
net/ipv4/inet_diag.c
net/ipv4/tcp.c
net/ipv4/tcp_output.c
net/sched/em_meta.c