From: GangYan <gang.yan@linux.dev>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: Gang Yan <yangang@kylinos.cn>, mptcp@lists.linux.dev
Subject: Re: [PATCH, mptcp-net] mptcp: fix address removal logic in mptcp_pm_nl_rm_addr
Date: Wed, 5 Nov 2025 10:13:50 +0800 [thread overview]
Message-ID: <aQqy3mG3hwlwRcck@thinkbook16p> (raw)
In-Reply-To: <bde9ef49-25c6-4892-8952-917ce5ff54a5@kernel.org>
> On Tue, Nov 04, 2025 at 03:34:38PM +0100, Matthieu Baerts wrote:
> Hi Gang,
>
> On 04/11/2025 13:34, Gang Yan wrote:
> > From: Gang Yan <yangang@kylinos.cn>
> >
> > Fix inverted WARN_ON_ONCE condition that prevented normal address
> > removal counter updates. The current code only executes decrement
> > logic when the counter is already 0 (abnormal state), while
> > normal removals (counter > 0) are ignored.
>
> Good catch!
>
> For fixes, we need a Fixes tag:
>
> Fixes: 636113918508 ("mptcp: pm: remove '_nl' from
> mptcp_pm_nl_rm_addr_received")
>
> Apart from that, it looks good to me:
>
> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>
> How did you find out about this? I'm surprised out test suite didn't
> spot it. By chance, do you have a test that can be used to reproduce
> this issue?
I've been looking into the work_pending-related issue described in
#ISSUE 440 and have designed several potentially affected scenarios
based on mptcp_join tests. Except for the case where endpoints are
deleted one by one and then re-added via ADD_ADDR (which fails), all
other related tests have passed. (I'll share some conclusions in the
corresponding discussion later.)
By tracing the relevant code, I found that the value of
'add_addr_accepted' here does not decrease, which subsequently blocks
further ADD_ADDR operations. We can verify the value of
'add_addr_accepted' in 'delete re-add signal' test, which can be found
in mptcp_join.sh, using either 'ss' or 'mptcp_diag'. The reason this
test didn't fail previously is that when the 'add_addr_accepted_limit'
was set to 3, the test's add_addr operations never reached the limit,
so no overflow occurred.
I lean toward using 'ss' to obtain the token and then retrieving the
'add_addr_accepted' value via 'mptcp_diag', because when the value is
zero, ss does not display it. Moreover, using 'mptcp_diag' minimizes
potential inconsistencies caused by different versions of iproute2,
making maintenance easier. WDYT?
Thanks,
Gang
>
> Cheers,
> Matt
> --
> Sponsored by the NGI0 Core fund.
>
next prev parent reply other threads:[~2025-11-05 2:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 12:34 [PATCH, mptcp-net] mptcp: fix address removal logic in mptcp_pm_nl_rm_addr Gang Yan
2025-11-04 13:49 ` MPTCP CI
2025-11-04 14:34 ` Matthieu Baerts
2025-11-05 2:13 ` GangYan [this message]
2025-11-05 2:19 ` GangYan
2025-11-05 11:22 ` 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=aQqy3mG3hwlwRcck@thinkbook16p \
--to=gang.yan@linux.dev \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=yangang@kylinos.cn \
/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