]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit897c9b47c3c25b6c2ba13fc9b3b589db238a35cc
tree7be26ef02ab2f2979be9a3cdeb36ed1bafc51354
parenta8bec3fb36efe919b8883ff46da028bc9a97fdb0
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