From: Matthieu Baerts <matttbe@kernel.org>
To: GangYan <gang.yan@linux.dev>
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 12:22:20 +0100 [thread overview]
Message-ID: <fe62bfa4-8112-4da4-9565-5665d36d9f2a@kernel.org> (raw)
In-Reply-To: <aQqy3mG3hwlwRcck@thinkbook16p>
Hi Gang,
On 05/11/2025 03:13, GangYan wrote:
>> 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.
OK, so the WARN_ON_ONCE() is not shown because add_addr_accepted is
never decremented, but it should have been decremented (not below the
limit).
> 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?
I think you can use 'ss', because it is already used in this test, see
chk_mptcp_info().
I suggest applying the fix now, the test can be added later.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
prev parent reply other threads:[~2025-11-05 11:22 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
2025-11-05 2:19 ` GangYan
2025-11-05 11:22 ` Matthieu Baerts [this message]
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=fe62bfa4-8112-4da4-9565-5665d36d9f2a@kernel.org \
--to=matttbe@kernel.org \
--cc=gang.yan@linux.dev \
--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