Skip to content

Commit 27fcaf0

Browse files
matttbegregkh
authored andcommitted
mptcp: safety check before fallback
[ Upstream commit db75a16 ] 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 <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent d7e9421 commit 27fcaf0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/mptcp/protocol.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,8 @@ static inline void __mptcp_do_fallback(struct mptcp_sock *msk)
11941194
pr_debug("TCP fallback already done (msk=%p)\n", msk);
11951195
return;
11961196
}
1197+
if (WARN_ON_ONCE(!READ_ONCE(msk->allow_infinite_fallback)))
1198+
return;
11971199
set_bit(MPTCP_FALLBACK_DONE, &msk->flags);
11981200
}
11991201

0 commit comments

Comments
 (0)