tcp: address KCSAN reports in tcp_poll() (part I)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | tcp: add rcu protection around tp->fastopen_rskinclude/ net/ net/ +8 more | +35 | 0 replies | |
| 2/9 | tcp: annotate tp->rcv_nxt lockless readsnet/ net/ net/ +3 more | +15 | 0 replies | |
| 3/9 | tcp: annotate tp->copied_seq lockless readsnet/ net/ net/ +4 more | +19 | 0 replies | |
| 4/9 | tcp: annotate tp->write_seq lockless readsinclude/ net/ net/ +4 more | +36 | 0 replies | |
| 5/9 | tcp: annotate tp->snd_nxt lockless readsinclude/ net/ net/ +1 more | +13 | 0 replies | |
| 6/9 | tcp: annotate tp->urg_seq lockless readsnet/ net/ | +4 | 0 replies | |
| 7/9 | tcp: annotate sk->sk_rcvbuf lockless readsinclude/ include/ net/ +4 more | +15 | 0 replies | |
| 8/9 | tcp: annotate sk->sk_sndbuf lockless readsinclude/ net/ net/ +2 more | +25 | 0 replies | |
| 9/9 | tcp: annotate sk->sk_wmem_queued lockless readsinclude/ include/ net/ +5 more | +24 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH net 0/9] tcp: address KCSAN reports in tcp_poll() (part I)
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(-)
Signature · 1 line
2.23.0.700.g56cf767bdb-goog