Re: [PATCH mptcp-net v4] mptcp: pm: fix data race in add_addr timer callback

Matthieu Baerts <[email protected]> Thu, 23 Jul 2026 10:13:24 +0200
Newsgroups dev.linux.lists.mptcp
Organization NGI0 Core
Message-ID <[email protected]>
Hi luoqing,

Thank you for the v4 and the reply.

Please next time do not send a new version as a reply to a previous one,
that's easier with a new thread and a link to the previous one.

On 23/07/2026 05:23, luoqing wrote:
>> How did you find the bug? Do you have a reproducer or is it by analysing
>> the code?
>>
>> Were you assisted by a tool/LLM? If yes, please add the Assisted-by tag.
>
> I discovered this potential issue while studying the new MPTCP path
> manager code. Through code analysis, I noticed that entry->retrans_times
> could be accessed both inside and outside the pm.lock, which appeared to
> create a race condition with mptcp_pm_announced_del_timer().
> Unfortunately, I don’t have a reproducer for this issue at the moment,
> as it’s difficult to construct a test scenario that reliably triggers
> this specific race condition. I submitted the patch based on code
> analysis to prevent potential issues.

To help categorise data race issues, these questions should be ideally
answered in the commit message:

- Is it a potential issue (i.e. code analysis but never reproduced), or
do we have a proof it can happen (i.e. KCSAN trace)

- If there is a proof, is it easy to reproduce? Is there a reliable
reproducer?

- Could this issue cause damages?

With the increase number of issues reported by AI, potential issues
without proofs might not need to be fixed, especially if it introduces a
higher complexity. Having a reproducer or at least a calltrace would
really help not to waste time on potentially unreproducible bug spot by
AI. But AI could also help to find a reproducer (ideally using packetdrill).

> I used AI tools to help verify and
> analyze the code logic during my investigation. However, I’m not
> entirely certain about the extent to which I should acknowledge this
> assistance, so I didn’t add an Assisted-by tag in the current version.
> If you think it’s necessary, I’d be happy to add it.

OK, thank you for the explanation. There are ongoing discussions [1] to
use this tag like this:

  Assisted-by: LLM # find issue, code, review, test

In your case, it would be this I suppose:

  Assisted-by: LLM # review

[1] https://lore.kernel.org/ksummit/[email protected]/

But that's still under discussions. In the meantime, it would help if
you write this with word in the commit message, e.g.

  I discovered this potential issue while studying the code. AI tools
  helped me to verify the issue can potentially happen.

(no need to send a v5, I will apply the v4)

>> For legal reasons, you are supposed to put your full name. Having only
>> one "word" for your full name, without capital letters looks wrong, no?
> I apologize for the confusion. “Luoqing” is actually my full name in
> Chinese convention - “Luo” (罗) is my family name and “Qing” (庆) is my
> given name. In Chinese, we don’t typically capitalize individual
> characters or add spaces between them. However, I understand the concern
> about the formatting, and I’ve updated the Signed-off-by to “Qing Luo
> [email protected]” to follow the Western name order convention, which I
> hope is more appropriate.

Thank you for the explanation! I understand that conventions are
different. I was asking because usually the "Western name order
convention" is used, and the full name is required, not a nickname. To
avoid confusions, even if I'm not a big fan of force people using a
different convention, I think it is easier with the Western form, if
that's OK for you.

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