All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mptcp: pm: fix extra_subflows underflow for userspace PM
@ 2026-05-14  9:50 Tao Cui
  2026-05-14  9:50 ` [PATCH v2 1/2] mptcp: pm: fix extra_subflows underflow on userspace PM connect failure Tao Cui
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Tao Cui @ 2026-05-14  9:50 UTC (permalink / raw)
  To: matttbe, martineau, geliang, davem, edumazet, kuba, pabeni
  Cc: horms, mptcp, Tao Cui

This is v2 of the series that fixes extra_subflows u8 underflow bugs
in the MPTCP userspace path manager.

extra_subflows is a u8 field in struct mptcp_pm_data. Two code paths
in the userspace PM can cause it to underflow from 0 to 255, after
which the counter is permanently corrupted and future subflow
creation is blocked.

Patch 1 skips the spurious mptcp_pm_close_subflow() call in
__mptcp_subflow_connect() when the userspace PM is in use, since it
does not pre-increment extra_subflows before attempting subflow
creation.

Patch 2 adds an underflow guard in mptcp_pm_subflow_check_next() to
avoid decrementing extra_subflows when it is already zero.

Tao Cui (2):
  mptcp: pm: fix extra_subflows underflow on userspace PM connect
    failure
  mptcp: pm: add extra_subflows underflow guard for userspace PM

 net/mptcp/pm.c      | 3 ++-
 net/mptcp/subflow.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

---
Changes in v2:
  - Dropped the use-after-free fix.
  - Split the underflow fix into two patches, one per code path.
v1:
  https://lore.kernel.org/all/20260509075629.217791-2-cuitao@kylinos.cn/
--
2.43.0

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

end of thread, other threads:[~2026-05-14 13:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  9:50 [PATCH v2 0/2] mptcp: pm: fix extra_subflows underflow for userspace PM Tao Cui
2026-05-14  9:50 ` [PATCH v2 1/2] mptcp: pm: fix extra_subflows underflow on userspace PM connect failure Tao Cui
2026-05-14  9:50 ` [PATCH v2 2/2] mptcp: pm: add extra_subflows underflow guard for userspace PM Tao Cui
2026-05-14 10:00 ` [PATCH v2 0/2] mptcp: pm: fix extra_subflows underflow " Tao Cui
2026-05-14 13:27   ` Tao Cui
2026-05-14 11:09 ` MPTCP CI

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.