public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH net 4/5] mptcp: pm: in-kernel: always mark signal+subflow endp as used
Date: Wed, 4 Mar 2026 10:22:21 +0100	[thread overview]
Message-ID: <af805e55-4372-4c76-8afa-e78c623d50eb@kernel.org> (raw)
In-Reply-To: <20260303-net-mptcp-misc-fixes-7-0-rc2-v1-4-4b5462b6f016@kernel.org>

Hello,

On 03/03/2026 11:56, Matthieu Baerts (NGI0) wrote:
> Syzkaller managed to find a combination of actions that was generating
> this warning:
(...)

> diff --git a/net/mptcp/pm_kernel.c b/net/mptcp/pm_kernel.c
> index b5316a6c7d1b..b2b9df43960e 100644
> --- a/net/mptcp/pm_kernel.c
> +++ b/net/mptcp/pm_kernel.c
> @@ -418,6 +418,15 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)
>  	}
>  
>  exit:
> +	/* If an endpoint has both the signal and subflow flags, but it is not
> +	 * possible to create subflows -- the 'while' loop body above never
> +	 * executed --  then still mark the endp as used, which is somehow the
> +	 * case. This avoids issues later when removing the endpoint and calling
> +	 * __mark_subflow_endp_available(), which expects the increment here.
> +	 */

Regarding the AI review [1], I don't think the comment should be more
precise by stating each case where the 'while' loop body is not
executed: such comment would easily get outdated when the conditions are
modified, and we forget to update it. The commit message explains the
conditions which are used today, but might change later. Also, the
endpoint is considered as used, not to create a subflow, but to signal
it in this strange specific case that probably only syzbot will use.

[1]
https://netdev-ai.bots.linux.dev/ai-review.html?id=addc1ffd-bcde-4ce7-80a5-306564dde16f

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


  reply	other threads:[~2026-03-04  9:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 10:56 [PATCH net 0/5] mptcp: misc fixes for v7.0-rc2 Matthieu Baerts (NGI0)
2026-03-03 10:56 ` [PATCH net 1/5] selftests: mptcp: more stable simult_flows tests Matthieu Baerts (NGI0)
2026-03-03 10:56 ` [PATCH net 2/5] mptcp: pm: avoid sending RM_ADDR over same subflow Matthieu Baerts (NGI0)
2026-03-03 10:56 ` [PATCH net 3/5] selftests: mptcp: join: check RM_ADDR not sent " Matthieu Baerts (NGI0)
2026-03-03 10:56 ` [PATCH net 4/5] mptcp: pm: in-kernel: always mark signal+subflow endp as used Matthieu Baerts (NGI0)
2026-03-04  9:22   ` Matthieu Baerts [this message]
2026-03-03 10:56 ` [PATCH net 5/5] selftests: mptcp: join: check removing signal+subflow endp Matthieu Baerts (NGI0)
2026-03-05  2:40 ` [PATCH net 0/5] mptcp: misc fixes for v7.0-rc2 patchwork-bot+netdevbpf
2026-03-05  3:02 ` Jakub Kicinski

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=af805e55-4372-4c76-8afa-e78c623d50eb@kernel.org \
    --to=matttbe@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    /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