This all started with a KCSAN report (included
in "tcp: annotate tp->rcv_nxt lockless reads" changelog)
tcp_poll() runs in a lockless way. This means that about
all accesses of tcp socket fields done in tcp_poll() context
need annotations otherwise KCSAN will complain about data-races.
While doing this detective work, I found a more serious bug,
addressed by the first patch ("tcp: add rcu protection around
tp->fastopen_rsk").
Eric Dumazet (9):
tcp: add rcu protection around tp->fastopen_rsk
tcp: annotate tp->rcv_nxt lockless reads
tcp: annotate tp->copied_seq lockless reads
tcp: annotate tp->write_seq lockless reads
tcp: annotate tp->snd_nxt lockless reads
tcp: annotate tp->urg_seq lockless reads
tcp: annotate sk->sk_rcvbuf lockless reads
tcp: annotate sk->sk_sndbuf lockless reads
tcp: annotate sk->sk_wmem_queued lockless reads
include/linux/tcp.h | 6 +--
include/net/sock.h | 29 ++++++++++-----
include/net/tcp.h | 7 ++--
include/trace/events/sock.h | 4 +-
net/core/datagram.c | 2 +-
net/core/filter.c | 6 ++-
net/core/request_sock.c | 2 +-
net/core/skbuff.c | 2 +-
net/core/sock.c | 22 ++++++-----
net/ipv4/inet_connection_sock.c | 4 +-
net/ipv4/inet_diag.c | 2 +-
net/ipv4/tcp.c | 65 +++++++++++++++++++--------------
net/ipv4/tcp_diag.c | 5 ++-
net/ipv4/tcp_fastopen.c | 2 +-
net/ipv4/tcp_input.c | 37 +++++++++++--------
net/ipv4/tcp_ipv4.c | 28 ++++++++------
net/ipv4/tcp_minisocks.c | 17 ++++++---
net/ipv4/tcp_output.c | 32 ++++++++--------
net/ipv4/tcp_timer.c | 11 +++---
net/ipv6/tcp_ipv6.c | 18 +++++----
net/sched/em_meta.c | 2 +-
21 files changed, 175 insertions(+), 128 deletions(-)
--
2.23.0.700.g56cf767bdb-goog