]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: annotate sk->sk_rcvbuf lockless reads
authorEric Dumazet <edumazet@google.com>
Fri, 11 Oct 2019 03:17:44 +0000 (20:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Oct 2019 17:13:08 +0000 (10:13 -0700)
commit17a91bcd70e196573bcfaccc1f38dc2565a30b9b
tree9a0ecbc667473f785c77851f2db6c31f1fa3d2a4
parent45185ef15ed29d5e90eae874ddf5e9c3abfa6782
tcp: annotate sk->sk_rcvbuf lockless reads

For the sake of tcp_poll(), there are few places where we fetch
sk->sk_rcvbuf 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.

Note that other transports probably need similar fixes.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
include/trace/events/sock.h
net/core/filter.c
net/core/skbuff.c
net/core/sock.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c