FAILED: patch "[PATCH] mptcp: fastclose msk when linger time is 0" failed to apply to 6.1-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.1-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]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x f14d6e9c3678a067f304abba561e0c5446c7e845
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026051200-skewed-easing-cc4c@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From f14d6e9c3678a067f304abba561e0c5446c7e845 Mon Sep 17 00:00:00 2001
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Mon, 27 Apr 2026 21:54:35 +0200
Subject: [PATCH] mptcp: fastclose msk when linger time is 0
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected.
To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset.
Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP.
Validated with MPTCP packetdrill tests [3].
net/mptcp/protocol.c +2 -1
@@ -3302,7 +3302,8 @@ bool __mptcp_close(struct sock *sk, long timeout) goto cleanup; } -if (mptcp_data_avail (msk) || timeout <0 ) { +if (mptcp_data_avail (msk) || timeout <0 || + (sock_flag (sk,SOCK_LINGER ) && !sk->sk_lingertime)) {/* If the msk has read data, or the caller explicitly ask it, * do the MPTCP equivalent of TCP reset, aka MPTCP fastclose */
Sasha Levin
maintainerPATCH 1/1 mptcp: fastclose msk when linger time is 0
From: "Matthieu Baerts (NGI0)" <[email protected]>
[ Upstream commit f14d6e9c3678a067f304abba561e0c5446c7e845 ]
The SO_LINGER socket option has been supported for a while with MPTCP sockets [1], but it didn't cause the equivalent of a TCP reset as expected when enabled and its time was set to 0. This was causing some behavioural differences with TCP where some connections were not promptly stopped as expected.
To fix that, an extra condition is checked at close() time before sending an MP_FASTCLOSE, the MPTCP equivalent of a TCP reset.
Note that backporting up to [1] will be difficult as more changes are needed to be able to send MP_FASTCLOSE. It seems better to stop at [2], which was supposed to already imitate TCP.
Validated with MPTCP packetdrill tests [3].
--- net/mptcp/protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/mptcp/protocol.c +2 -1
@@ -3154,7 +3154,8 @@ bool __mptcp_close(struct sock *sk, long timeout) goto cleanup; } -if (mptcp_check_readable (msk)) { +if (mptcp_check_readable (msk) || + (sock_flag (sk,SOCK_LINGER ) && !sk->sk_lingertime)) {/* the msk has read data, do the MPTCP equivalent of TCP reset */ inet_sk_state_store (sk,TCP_CLOSE );mptcp_do_fastclose (sk);
Signature · 1 line
2.53.0