Skip to content

mptcp: pm: net-next port of the alloc-during-teardown leak fix

Shardul Bankar mptcp 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Squash to "mptcp: pm: init and release mptcp_pm_ops"net/mptcp/pm.c net/mptcp/pm_userspace.c+6 -60 replies
2/2mptcp: pm: fix memory leak from alloc-during-teardown racenet/mptcp/pm.c net/mptcp/pm_userspace.c net/mptcp/protocol.h+17 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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/[email protected]/

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(-)
Signature · 1 line
2.34.1