summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>2025-02-24 19:11:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-28 21:58:53 +0100
commit3c6e077b2a2de28ea0e7e55434a8f5927eb1fc4d (patch)
treef5296cd6f9dfea68b04cd0234b3a125f936b9271 /net
parent452382b2737dcdaa969d3871e16d14de7402107c (diff)
downloadlinux-3c6e077b2a2de28ea0e7e55434a8f5927eb1fc4d.tar.gz
linux-3c6e077b2a2de28ea0e7e55434a8f5927eb1fc4d.tar.bz2
linux-3c6e077b2a2de28ea0e7e55434a8f5927eb1fc4d.zip
mptcp: safety check before fallback
[ 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>
Diffstat (limited to 'net')
-rw-r--r--net/mptcp/protocol.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 77e727d81cc2..25c1cda5c1bc 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -981,6 +981,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);
}