From: Tao Cui <cui.tao@linux.dev>
To: mptcp@lists.linux.dev
Cc: matttbe@kernel.org, geliang@kernel.org, cuitao@kylinos.cn,
cui.tao@linux.dev
Subject: [PATCH mptcp-next 0/2] mptcp: pm: fix reachable extra_subflows guards
Date: Mon, 31 Aug 2026 17:32:04 +0800 [thread overview]
Message-ID: <20260831093206.689827-1-cui.tao@linux.dev> (raw)
From: Tao Cui <cuitao@kylinos.cn>
Hi,
Following up on issue #629, here is a fix series for the two paths
reported against e99c1ca871 ("mptcp: pm: add WARN_ON_ONCE guards
on extra_subflows underflow").
Patch 1 bounds the userspace PM admission at U8_MAX, so the u8 can
no longer be wrapped by a peer establishing more than 255 subflows.
Patch 2 addresses the disconnect() vs MP_JOIN race: as discussed,
the decrement sites now check the msk state first and skip the
accounting when the msk is already in TCP_CLOSE, as the state is set
before mptcp_pm_data_reset() clears the counters, and once the msk
is closed the accounting is not relevant anymore. No new lock is
involved. The guards themselves are downgraded to a clamp with a
rate-limited pr_warn(), as the warn was reachable and turned into a
remotely triggerable panic on panic_on_warn kernels.
Both patches carry a Link: to the issue with the detailed analysis.
Validated with the virtme CI (mptcp selftests), and with a stress
repro comparing the base kernel and the patched one: on the base
kernel the server accepts 256 MP_JOINs and the counter wraps to 0,
with the patches admission stops at 255 and the leftover imbalance
only shows up as a rate-limited warning.
Tao Cui (2):
mptcp: pm: bound extra_subflows admission on userspace PM
mptcp: pm: skip extra_subflows accounting on disconnected msk
net/mptcp/pm.c | 22 +++++++++++++++++++---
net/mptcp/protocol.h | 14 ++++++++++++--
2 files changed, 31 insertions(+), 5 deletions(-)
--
2.43.0
next reply other threads:[~2026-08-31 9:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 9:32 Tao Cui [this message]
2026-08-31 9:32 ` [PATCH mptcp-next 1/2] mptcp: pm: bound extra_subflows admission on userspace PM Tao Cui
2026-09-02 16:39 ` Matthieu Baerts
2026-09-03 3:42 ` quanyeyang
2026-09-03 8:57 ` Tao Cui
2026-09-03 8:55 ` Tao Cui
2026-09-03 9:13 ` Matthieu Baerts
2026-08-31 9:32 ` [PATCH mptcp-next 2/2] mptcp: pm: skip extra_subflows accounting on disconnected msk Tao Cui
2026-08-31 10:11 ` sashiko-bot
2026-08-31 13:00 ` Tao Cui
2026-09-02 16:32 ` Matthieu Baerts
2026-09-02 16:56 ` Matthieu Baerts
2026-08-31 10:25 ` [PATCH mptcp-next 0/2] mptcp: pm: fix reachable extra_subflows guards MPTCP CI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260831093206.689827-1-cui.tao@linux.dev \
--to=cui.tao@linux.dev \
--cc=cuitao@kylinos.cn \
--cc=geliang@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.