Skip to contentSkip to conversation

FAILED: patch "[PATCH] mptcp: reset last_snd on subflow close" failed to apply to 5.10-stable tree

PATCH [email protected] 1 participant 1 message Mar 11, 2021

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From e0be4931f3fee2e04dec4013ea4f27ec2db8556f Mon Sep 17 00:00:00 2001
From: Florian Westphal <[email protected]>
Date: Thu, 4 Mar 2021 13:32:08 -0800
Subject: [PATCH] mptcp: reset last_snd on subflow close

Send logic caches last active subflow in the msk, so it needs to be cleared when the cached subflow is closed.

net/mptcp/protocol.c +5 -0
index c5d5e68940ea..7362a536cbc0 100644
@@ -2126,6 +2126,8 @@ static struct sock *mptcp_subflow_get_retrans(const struct mptcp_sock *msk)
 static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,
 			      struct mptcp_subflow_context *subflow)
 {
+	struct mptcp_sock *msk = mptcp_sk(sk);
+
 	list_del(&subflow->node);
 
 	lock_sock_nested(ssk, SINGLE_DEPTH_NESTING);
@@ -2154,6 +2156,9 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk,
 	release_sock(ssk);
 
 	sock_put(ssk);
+
+	if (ssk == msk->last_snd)
+		msk->last_snd = NULL;
 }
 
 void mptcp_close_ssk(struct sock *sk, struct sock *ssk,