From: Matthieu Baerts <matttbe@kernel.org>
To: Kyle Zeng <kylebot@openai.com>
Cc: mptcp@lists.linux.dev, Mat Martineau <martineau@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
outbounddisclosures@openai.com
Subject: Re: [PATCH] mptcp: pm: kernel: use RCU to free endpoint listeners
Date: Mon, 2 Nov 2026 19:07:14 +0100 [thread overview]
Message-ID: <d34469ed-1e6a-498d-beab-1c4900ad2afb@kernel.org> (raw)
In-Reply-To: <20261030042255.74216-1-kylebot@openai.com>
Hi Kyle,
On 30/10/2026 05:22, Kyle Zeng wrote:
> 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 fix, it looks good to me!
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
@Net maintainers: this patch can be applied in -net directly.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-11-02 18:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 4:22 [PATCH] mptcp: pm: kernel: use RCU to free endpoint listeners Kyle Zeng
2026-10-30 4:29 ` netdev-bot+sinfo
2026-10-30 6:16 ` MPTCP CI
2026-11-02 18:07 ` 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=d34469ed-1e6a-498d-beab-1c4900ad2afb@kernel.org \
--to=matttbe@kernel.org \
--cc=kylebot@openai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=outbounddisclosures@openai.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.