[PATCH mptcp-next 0/2] mptcp: pm: net-next port of the alloc-during-teardown leak fix

Shardul Bankar posted 2 patches 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20260620084424.3072634-1-shardul.b@mpiricsoftware.com
net/mptcp/pm.c           | 13 +++++++++++++
net/mptcp/pm_userspace.c | 10 ++++------
net/mptcp/protocol.h     |  8 ++++++--
3 files changed, 23 insertions(+), 8 deletions(-)
[PATCH mptcp-next 0/2] mptcp: pm: net-next port of the alloc-during-teardown leak fix
Posted by Shardul Bankar 2 weeks ago
This is the net-next counterpart of the net fix "mptcp: pm: fix memory
leak from alloc-during-teardown race" (v3):
https://lore.kernel.org/all/20260611003613.3184956-1-shardul.b@mpiricsoftware.com/

v3 remains the canonical fix for net; it applies as-is on export-net. It
does not apply on export, because the userspace local address list free
moved into the userspace path manager .release callback in "mptcp: pm:
init and release mptcp_pm_ops". This series ports the fix to net-next:

  1/2 squashes the unconditional free into that refactor commit (covering
      the disconnect/reuse path).
  2/2 is the MPTCP_PM_DESTROYING fence (the alloc-during-teardown race),
      rebased onto the renamed mptcp_pm_announced_alloc() /
      mptcp_pm_destroy().

The net fix was validated with an MPTCP protocol-flow harness (BRF) over
multi-hour runs with zero kmemleak reports (reported on the v3 thread).
This port is structurally equivalent and is sent so the CI can exercise
it on net-next.

Shardul Bankar (2):
  Squash to "mptcp: pm: init and release mptcp_pm_ops"
  mptcp: pm: fix memory leak from alloc-during-teardown race

 net/mptcp/pm.c           | 13 +++++++++++++
 net/mptcp/pm_userspace.c | 10 ++++------
 net/mptcp/protocol.h     |  8 ++++++--
 3 files changed, 23 insertions(+), 8 deletions(-)

-- 
2.34.1
Re: [PATCH mptcp-next 0/2] mptcp: pm: net-next port of the alloc-during-teardown leak fix
Posted by MPTCP CI 2 weeks ago
Hi Shardul,

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): Notice: Call Traces at boot time, rebooted and continued ⚠️ 
- KVM Validation: debug (only selftest_mptcp_join): Notice: Call Traces at boot time, rebooted and continued ⚠️ 
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Notice: Call Traces at boot time, rebooted and continued ⚠️ 
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/27866429471

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


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)