From abaa95801681bd2516325fa26ffdce873d400aa9 Mon Sep 17 00:00:00 2001 From: Paolo Abeni Date: Wed, 2 Oct 2024 17:10:41 +0200 Subject: [PATCH] Squash-to: "mptcp: handle consistently DSS corruption" Instead of re-inventing the wheel, use the flag we already track to easily check if fallback is allowed. Note that we could not check conn_list in a reliable way, as the call side is not under the msk socket lock. Signed-off-by: Paolo Abeni --- net/mptcp/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index ba5f4f44f4b3cc..fd1c2e866e8ef0 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -622,7 +622,7 @@ static bool mptcp_check_data_fin(struct sock *sk) static void mptcp_dss_corruption(struct mptcp_sock *msk, struct sock *ssk) { - if (list_is_singular(&msk->conn_list) && msk->first == ssk) { + if (READ_ONCE(msk->allow_infinite_fallback)) { MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DSSCORRUPTIONFALLBACK); mptcp_do_fallback(ssk);