From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: mptcp@lists.linux.dev, stable@vger.kernel.org,
gregkh@linuxfoundation.org
Cc: Paolo Abeni <pabeni@redhat.com>,
sashal@kernel.org, "Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH 6.12.y 2/5] mptcp: remove unneeded READ_ONCE() annotation
Date: Sat, 19 Sep 2026 21:56:45 +0200 [thread overview]
Message-ID: <20260919195642.1977885-9-matttbe@kernel.org> (raw)
In-Reply-To: <20260919195642.1977885-7-matttbe@kernel.org>
From: Paolo Abeni <pabeni@redhat.com>
commit caa4a79f74f32084ce28aee8653bc04df745970d upstream.
The subflow->fully_established flag is always written under the subflow
socket lock. Reading such value under the same lock does not require any
ONCE annotation.
Fixes: 581c8cbfa934 ("mptcp: annotate data-races around subflow->fully_established")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-10-df1de70348b6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 2b0f561f21b2 ("mptcp: avoid unneeded actions on subflow reset")
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/options.c | 4 ++--
net/mptcp/protocol.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 123c3691833f..d238dd374ce9 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -532,7 +532,7 @@ static bool mptcp_established_options_mp(struct sock *sk, struct sk_buff *skb,
return false;
/* MPC/MPJ needed only on 3rd ack packet, DATA_FIN and TCP shutdown take precedence */
- if (READ_ONCE(subflow->fully_established) || snd_data_fin_enable ||
+ if (subflow->fully_established || snd_data_fin_enable ||
subflow->snd_isn != TCP_SKB_CB(skb)->seq ||
sk->sk_state != TCP_ESTABLISHED)
return false;
@@ -999,7 +999,7 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
/* here we can process OoO, in-window pkts, only in-sequence 4th ack
* will make the subflow fully established
*/
- if (likely(READ_ONCE(subflow->fully_established))) {
+ if (likely(subflow->fully_established)) {
/* on passive sockets, check for 3rd ack retransmission
* note that msk is always set by subflow_syn_recv_sock()
* for mp_join subflows
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index a4054ed24605..2f34e92d9cce 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3685,7 +3685,7 @@ static void schedule_3rdack_retransmission(struct sock *ssk)
struct tcp_sock *tp = tcp_sk(ssk);
unsigned long timeout;
- if (READ_ONCE(mptcp_subflow_ctx(ssk)->fully_established))
+ if (mptcp_subflow_ctx(ssk)->fully_established)
return;
/* reschedule with a timeout above RTT, as we must look only for drop */
--
2.55.0
next prev parent reply other threads:[~2026-09-19 19:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 19:56 [PATCH 6.12.y 0/5] mptcp: fix recent failed backports (20260919) Matthieu Baerts (NGI0)
2026-09-19 19:56 ` [PATCH 6.12.y 1/5] mptcp: annotate data-races around subflow->fully_established Matthieu Baerts (NGI0)
2026-09-20 7:36 ` Patch "mptcp: annotate data-races around subflow->fully_established" has been added to the 6.12-stable tree gregkh
2026-09-20 7:48 ` sashiko-bot
2026-09-20 9:33 ` Matthieu Baerts
2026-09-20 13:10 ` Greg KH
2026-09-20 13:23 ` Matthieu Baerts
2026-09-19 19:56 ` Matthieu Baerts (NGI0) [this message]
2026-09-19 19:56 ` [PATCH 6.12.y 3/5] mptcp: avoid unneeded actions on subflow reset Matthieu Baerts (NGI0)
2026-09-20 7:36 ` Patch "mptcp: avoid unneeded actions on subflow reset" has been added to the 6.12-stable tree gregkh
2026-09-19 19:56 ` [PATCH 6.12.y 4/5] mptcp: close race between scheduler and state change Matthieu Baerts (NGI0)
2026-09-20 7:36 ` Patch "mptcp: close race between scheduler and state change" has been added to the 6.12-stable tree gregkh
2026-09-19 19:56 ` [PATCH 6.12.y 5/5] mptcp: fix bad accounting in __mptcp_subflow_push_pending() Matthieu Baerts (NGI0)
2026-09-20 7:36 ` Patch "mptcp: fix bad accounting in __mptcp_subflow_push_pending()" has been added to the 6.12-stable tree gregkh
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=20260919195642.1977885-9-matttbe@kernel.org \
--to=matttbe@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kuba@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=sashal@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