mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/2] tcp: annotate lockless access to sk->sk_err
@ 2026-09-17 13:41 Quanye Yang via B4 Relay
  2026-09-17 13:41 ` [PATCH net-next v4 1/2] " Quanye Yang via B4 Relay
  2026-09-17 13:41 ` [PATCH net-next v4 2/2] mptcp: " Quanye Yang via B4 Relay
  0 siblings, 2 replies; 8+ messages in thread
From: Quanye Yang via B4 Relay @ 2026-09-17 13:41 UTC (permalink / raw)
  To: Eric Dumazet, Neal Cardwell, Kuniyuki Iwashima, David S. Miller,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Matthieu Baerts (NGI0),
	Geliang Tang, Mat Martineau, Jiayuan Chen
  Cc: netdev, linux-kernel

do_recvmmsg() and getsockopt(SO_ERROR) call sock_error() without the
socket lock and clear sk_err with xchg(). Annotate the matching
lockless peeks with READ_ONCE().

Patch 1 covers TCP. Patch 2 covers MPTCP, including the remaining
unmarked subflow peeks.

This does not consume sk_err. The check-then-sock_error() TOCTOU on
the no-data paths is a separate issue.

---
Changes in v4:
- split the annotation change, one points to tcp and another points to
  mptcp.
- annotate the remaining unmarked MPTCP sk_err peeks on the
  subflow error-report path.
- Link to v3: https://patch.msgid.link/20260912-mptcp-sk-err-net-v3-1-c41383878bde@proton.me

Changes in v3:
- drop the Fixes tag and retarget to net-next
- annotate the remaining unmarked sk_err peeks on the TCP/MPTCP
  send, recv and splice paths
- Link to v2: https://patch.msgid.link/20260909-mptcp-sk-err-net-v2-1-5044abecac90@proton.me

Changes in v2:
- add Reported-by and Closes for the MPTCP syzkaller report
- Link to v1: https://patch.msgid.link/20260908-mptcp-sk-err-net-v1-1-da71aaec9afd@proton.me

---
Quanye Yang (2):
      tcp: annotate lockless access to sk->sk_err
      mptcp: annotate lockless access to sk->sk_err

 include/net/tcp.h    | 3 ++-
 net/core/stream.c    | 2 +-
 net/ipv4/tcp.c       | 6 +++---
 net/ipv4/tcp_bpf.c   | 7 +++----
 net/mptcp/protocol.c | 8 ++++----
 net/mptcp/subflow.c  | 4 ++--
 6 files changed, 15 insertions(+), 15 deletions(-)
---
base-commit: 211f2a875f6f447745d80d5762d6d614503ac84a
change-id: 20260908-mptcp-sk-err-net-7ff88ef05044

Best regards,
--  
Quanye Yang <quanyeyang@proton.me>



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-18 14:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 13:41 [PATCH net-next v4 0/2] tcp: annotate lockless access to sk->sk_err Quanye Yang via B4 Relay
2026-09-17 13:41 ` [PATCH net-next v4 1/2] " Quanye Yang via B4 Relay
2026-09-18  9:51   ` David Laight
2026-09-18 10:33     ` quanyeyang
2026-09-18 12:27       ` David Laight
2026-09-18 14:49         ` quanyeyang
2026-09-17 13:41 ` [PATCH net-next v4 2/2] mptcp: " Quanye Yang via B4 Relay
2026-09-18 11:28   ` Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®