From: sashiko-bot@kernel.org
To: "T S Rameshkumar" <rameshsv06@gmail.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH v4] mptcp: push queued data on passive TFO subflows becoming established
Date: Thu, 08 Oct 2026 12:56:16 +0000 [thread overview]
Message-ID: <sashiko-outbox-164183@kernel.org> (raw)
In-Reply-To: <20261008124220.213016-1-rameshkumar.t@phytecembedded.in>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] mptcp: data race in mptcp_subflow_context bitfield on close_event_done
--
commit 5833b858d2930ce8da576be275d9bd667c3816cd
Author: T S Rameshkumar <rameshsv06@gmail.com>
mptcp: push queued data on passive TFO subflows becoming established
With TCP Fast Open on an MPTCP listener, if the server application
writes data while the passive subflow is still in SYN_RECV,
__mptcp_subflow_active() refuses transmission and the data is queued
into the msk write queue.
Closes: https://lore.kernel.org/netdev/CAFPPu1gU2Y-D+d4i3F0MoNkYK+e1U+=X3qf6QycjfKBw+8snPg@mail.gmail.com/
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 0384d6a023f9d..0e44de1298007 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -582,15 +582,15 @@ struct mptcp_subflow_context {
> disposable : 1, /* ctx can be free at ulp release time */
> closing : 1, /* must not pass rx data to msk anymore */
> valid_csum_seen : 1, /* at least one csum validated */
> - is_mptfo : 1, /* subflow is doing TFO */
> close_event_done : 1, /* has done the post-closed part */
[Severity: High]
Does leaving close_event_done in this bitfield still result in a data race?
In net/mptcp/protocol.c:mptcp_close_ssk(), subflow->close_event_done is set
to true while holding only the msk lock.
Concurrently, the TCP RX path calls subflow_data_ready() ->
mptcp_subflow_data_available() -> subflow_check_data_avail() in
net/mptcp/subflow.c, which sets subflow->map_valid = 1 holding only the
ssk (subflow) lock.
Since close_event_done and map_valid are part of the same u32 bitfield,
could these uncoordinated read-modify-write operations cause concurrent
updates to be silently lost, potentially dropping valid data or executing
mptcp_close_ssk() multiple times?
> mpc_drop : 1, /* the MPC option has been dropped in a rtx */
> resetting : 1, /* subflow is resetting */
> - __unused : 8;
> + __unused : 9;
> bool data_avail;
> bool scheduled;
> bool pm_listener; /* a listener managed by the kernel PM? */
> bool fully_established; /* path validated */
> + bool is_mptfo; /* subflow is doing TFO */
> u32 lent_mem_frag;
> u32 remote_nonce;
> u64 thmac;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261008124220.213016-1-rameshkumar.t@phytecembedded.in?part=1
next prev parent reply other threads:[~2026-10-08 12:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 12:42 [PATCH v4] mptcp: push queued data on passive TFO subflows becoming established T S Rameshkumar
2026-10-08 12:56 ` sashiko-bot [this message]
2026-10-08 13:03 ` Matthieu Baerts
[not found] ` <PN0PR01MB9382C18780E137E3013A097CF4932@PN0PR01MB9382.INDPRD01.PROD.OUTLOOK.COM>
2026-10-08 13:31 ` Matthieu Baerts
2026-10-08 14:39 ` Petar Sakic
2026-10-08 16:10 ` Matthieu Baerts
2026-10-12 9:43 ` Matthieu Baerts
2026-10-10 7:40 ` netdev-bot+sashiko
-- strict thread matches above, loose matches on Subject: below --
2026-10-08 12:16 T S Rameshkumar
2026-10-08 12:29 ` sashiko-bot
2026-10-08 13:42 ` MPTCP CI
[not found] ` <CADRhS2uk-P8TSmyiM=X5JQXHtzdm68vg6+vyBDr-UCf0EAu0HA@mail.gmail.com>
2026-10-12 13:28 ` Matthieu Baerts
2026-10-12 19:48 ` Petar Sakic
2026-10-13 9:28 ` Matthieu Baerts
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=sashiko-outbox-164183@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=rameshsv06@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/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.