public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	Sasha Levin <sashal@kernel.org>,
	martineau@kernel.org, davem@davemloft.net, edumazet@google.com,
	netdev@vger.kernel.org, mptcp@lists.linux.dev
Subject: [PATCH AUTOSEL 5.10 6/8] mptcp: safety check before fallback
Date: Mon,  3 Mar 2025 11:32:09 -0500	[thread overview]
Message-ID: <20250303163211.3764282-6-sashal@kernel.org> (raw)
In-Reply-To: <20250303163211.3764282-1-sashal@kernel.org>

From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>

[ Upstream commit db75a16813aabae3b78c06b1b99f5e314c1f55d3 ]

Recently, some fallback have been initiated, while the connection was
not supposed to fallback.

Add a safety check with a warning to detect when an wrong attempt to
fallback is being done. This should help detecting any future issues
quicker.

Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-3-f550f636b435@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/mptcp/protocol.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 2330140d6b1cc..f5aeb3061408a 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -530,6 +530,8 @@ static inline void __mptcp_do_fallback(struct mptcp_sock *msk)
 		pr_debug("TCP fallback already done (msk=%p)\n", msk);
 		return;
 	}
+	if (WARN_ON_ONCE(!READ_ONCE(msk->allow_infinite_fallback)))
+		return;
 	set_bit(MPTCP_FALLBACK_DONE, &msk->flags);
 }
 
-- 
2.39.5


  parent reply	other threads:[~2025-03-03 16:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-03 16:32 [PATCH AUTOSEL 5.10 1/8] ASoC: tas2770: Fix volume scale Sasha Levin
2025-03-03 16:32 ` [PATCH AUTOSEL 5.10 2/8] ASoC: tas2764: Fix power control mask Sasha Levin
2025-03-03 16:32 ` [PATCH AUTOSEL 5.10 3/8] ASoC: tas2764: Set the SDOUT polarity correctly Sasha Levin
2025-03-03 16:32 ` [PATCH AUTOSEL 5.10 4/8] fuse: don't truncate cached, mutated symlink Sasha Levin
2025-03-03 16:32 ` [PATCH AUTOSEL 5.10 5/8] x86/irq: Define trace events conditionally Sasha Levin
2025-03-03 16:32 ` Sasha Levin [this message]
2025-03-03 16:32 ` [PATCH AUTOSEL 5.10 7/8] drm/nouveau: Do not override forced connector status Sasha Levin
2025-03-03 16:32 ` [PATCH AUTOSEL 5.10 8/8] block: fix 'kmem_cache of name 'bio-108' already exists' Sasha Levin

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=20250303163211.3764282-6-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --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