[PATCH mptcp-net v3 0/3] mptcp: fix reported data-races

quanyeyang@proton.me posted 3 patches 2 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20260907-mptcp-snd-una-race-v3-0-65ba0d5f0221@proton.me
include/net/tcp.h    | 3 ++-
net/mptcp/protocol.c | 4 +++-
net/mptcp/protocol.h | 6 ++++--
3 files changed, 9 insertions(+), 4 deletions(-)
[PATCH mptcp-net v3 0/3] mptcp: fix reported data-races
Posted by quanyeyang@proton.me 2 weeks, 5 days ago
Fix three KCSAN reports involving the MPTCP receive and retransmit
paths.

Patch 1 picks up Matthieu's v2 fixing the lockless snd_una read.

Patch 2 fixes the lockless access to the TCP subflow's icsk_pending
field when calculating the MPTCP retransmission timeout.

Patch 3 fixes the lockless sk_err access in tcp_recv_should_stop(),
as sock_error() can clear the field without holding the socket lock.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/627
Link: https://lore.kernel.org/mptcp/20260317-mptcp-data-race-snd_una-v2-1-2caac60de92a@kernel.org/
---
v3:
 - rebase on the MPTCP export branch
 - wrap the snd_una field comment to satisfy checkpatch
 - add fixes for the reported icsk_pending and sk_err races
 - exclude the unrelated workqueue and timekeeping reports

v2:
 - mention under which locks the field is updated and read
 - add a comment where snd_una is defined

To: mptcp@lists.linux.dev

---
Matthieu Baerts (NGI0) (1):
      mptcp: fix data-race in __mptcp_retrans / mptcp_incoming_options

Quanye Yang (2):
      mptcp: fix data-race in mptcp_subflow_get_send / tcp_ack
      tcp: fix data-race in do_recvmmsg / mptcp_recvmsg

 include/net/tcp.h    | 3 ++-
 net/mptcp/protocol.c | 4 +++-
 net/mptcp/protocol.h | 6 ++++--
 3 files changed, 9 insertions(+), 4 deletions(-)
---
base-commit: 45f7c939f8b155208c7447517e588c9fb133388c
change-id: 20260906-mptcp-snd-una-race-be0262e82b97

Best regards,
--  
Quanye Yang <quanyeyang@proton.me>
Re: [PATCH mptcp-net v3 0/3] mptcp: fix reported data-races
Posted by MPTCP CI 2 weeks, 5 days ago
Hi Quanye,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Perf: 
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/34112482705

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/7d66f95769e2
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1159615


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)