All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Tao Cui <cui.tao@linux.dev>, mptcp@lists.linux.dev
Cc: geliang@kernel.org, cuitao@kylinos.cn
Subject: Re: [PATCH mptcp-next 2/2] mptcp: pm: skip extra_subflows accounting on disconnected msk
Date: Wed, 2 Sep 2026 18:56:54 +0200	[thread overview]
Message-ID: <ce1ad12f-1da7-457f-b5a7-187ee174c63e@kernel.org> (raw)
In-Reply-To: <20260831093206.689827-3-cui.tao@linux.dev>

Hi Tao Cui,

On 31/08/2026 11:32, Tao Cui wrote:
> From: Tao Cui <cuitao@kylinos.cn>
> 
> The WARN_ON_ONCE() guards added to the extra_subflows decrement sites
> turn out to be reachable:
> 
> mptcp_pm_data_reset() zeroes the counter with only the msk socket lock
> held, while an MP_JOIN subflow can still sit in msk->join_list, its
> reference already accounted by mptcp_pm_allow_new_subflow() under
> pm->lock. If the socket gets disconnected(AF_UNSPEC) in that window,
> mptcp_pm_data_reset() zeroes the counter, and the join list is flushed
> later at release_sock() time: the leftover subflow then reaches
> mptcp_pm_subflow_check_next() (or __mptcp_pm_close_subflow() for
> kernel PM sockets) with the counter already at 0, firing the warning.
> On panic_on_warn kernels this is a remotely triggerable panic, which
> is worse than the silent wrap the guards replaced.
> 
> Skip the PM accounting when the msk is already in TCP_CLOSE: in the
> scenario above the state is set before the counters are cleared, and
> once the msk is closed the accounting is not relevant anymore. Keep a
> clamp and a rate-limited pr_warn() on the decrement sites instead,
> to leave a trace of any imbalance we would still not know about.
> 
> Fixes: e99c1ca89071 ("mptcp: pm: add WARN_ON_ONCE guards on extra_subflows underflow")
> Link: https://github.com/multipath-tcp/mptcp_net-next/issues/629

This patch looks good to me, but could you please use the "Closes" tag
for the last patch of the series closing this ticket, please?

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  parent reply	other threads:[~2026-09-02 16:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  9:32 [PATCH mptcp-next 0/2] mptcp: pm: fix reachable extra_subflows guards Tao Cui
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 [this message]
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=ce1ad12f-1da7-457f-b5a7-187ee174c63e@kernel.org \
    --to=matttbe@kernel.org \
    --cc=cui.tao@linux.dev \
    --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 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.