From: Matthieu Baerts <matttbe@kernel.org>
To: Eric Dumazet <edumazet@kernel.org>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
netdev@vger.kernel.org, Kyle Zeng <kylebot@openai.com>,
stable@vger.kernel.org
Subject: Re: [PATCH net] mptcp: pm: kernel: use RCU to free endpoint listeners
Date: Wed, 4 Nov 2026 16:37:23 +0100 [thread overview]
Message-ID: <c52585e9-e3c7-4f75-9a3b-8a32e3559a5a@kernel.org> (raw)
In-Reply-To: <20261104125327.1041456-1-edumazet@kernel.org>
Hi Eric,
On 04/11/2026 13:53, Eric Dumazet wrote:
> From: Kyle Zeng <kylebot@openai.com>
>
> mptcp_pm_nl_create_listen_socket() starts the TCP listener directly
> instead of going through mptcp_listen(). It consequently misses setting
> SOCK_RCU_FREE on the parent MPTCP socket.
>
> tcp_child_process() can invoke the listener's subflow_data_ready()
> callback without holding the MPTCP parent lock or a reference to the
> parent. An authenticated MP_JOIN racing with endpoint teardown can
> therefore access the parent after its last reference has been dropped.
> The ADD_ADDR error path can also close an already published listener.
>
> Set SOCK_RCU_FREE before __inet_listen_sk() publishes the TCP listener,
> matching mptcp_listen(). This protects the parent on every subsequent
> close path, including a failed endpoint addition.
Thank you for the patch! But it looks like Kyle already sent it earlier
to the same list:
https://lore.kernel.org/20261030042255.74216-1-kylebot@openai.com
Probably best to drop this one here?
(It's not clear what PW state we want to set for this case)
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-11-04 15:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 12:53 [PATCH net] mptcp: pm: kernel: use RCU to free endpoint listeners Eric Dumazet
2026-11-04 12:59 ` netdev-bot+sinfo
2026-11-04 15:37 ` Matthieu Baerts [this message]
2026-11-05 14:10 ` patchwork-bot+netdevbpf
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=c52585e9-e3c7-4f75-9a3b-8a32e3559a5a@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=kylebot@openai.com \
--cc=martineau@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--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