From: Matthieu Baerts <matttbe@kernel.org>
To: Tao Cui <cuitao@kylinos.cn>, geliang@kernel.org
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-net v4 0/2] mptcp: pm: fix extra_subflows underflow for userspace PM
Date: Wed, 27 May 2026 21:20:13 +1000 [thread overview]
Message-ID: <9fa37802-e993-4fc7-96f5-ba9eb802611a@kernel.org> (raw)
In-Reply-To: <20260522084658.1896374-1-cuitao@kylinos.cn>
Hi Tao,
On 22/05/2026 18:46, Tao Cui wrote:
> This is v4 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. The userspace PM
> increments it after __mptcp_subflow_connect() succeeds, but
> __mptcp_subflow_connect() calls mptcp_pm_close_subflow() on failure to
> roll back the pre-increment done by the kernel PM. Because the userspace
> PM hasn't incremented yet at that point, this decrement is spurious and
> causes extra_subflows to underflow from 0 to 255.
>
> Patch 1 fixes the underflow by aligning the userspace PM with the kernel
> PM: increment extra_subflows before calling __mptcp_subflow_connect(),
> so the existing error path in subflow.c correctly rolls it back on
> failure. This also eliminates the race window described in v3 patch 2
> where the worker could decrement before the user thread increments.
>
> Patch 2 adds a selftest to validate that subflow creation failure with
> an unreachable address does not corrupt the extra_subflows counter.
Thank you for the v4, the series looks good to me:
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-05-27 11:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 8:46 [PATCH mptcp-net v4 0/2] mptcp: pm: fix extra_subflows underflow for userspace PM Tao Cui
2026-05-22 8:46 ` [PATCH mptcp-net v4 1/2] mptcp: pm: fix extra_subflows underflow on userspace PM subflow creation Tao Cui
2026-05-22 8:46 ` [PATCH mptcp-net v4 2/2] selftests: mptcp: add test for extra_subflows underflow on userspace PM Tao Cui
2026-05-22 10:26 ` [PATCH mptcp-net v4 0/2] mptcp: pm: fix extra_subflows underflow for " MPTCP CI
2026-05-27 11:20 ` Matthieu Baerts [this message]
2026-05-27 11:34 ` Matthieu Baerts
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=9fa37802-e993-4fc7-96f5-ba9eb802611a@kernel.org \
--to=matttbe@kernel.org \
--cc=cuitao@kylinos.cn \
--cc=geliang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox