* [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes
@ 2026-11-18 5:42 Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 1/4] ms/mptcp: reset rcv wnd on disconnect Eva Kurchatova
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Eva Kurchatova @ 2026-11-18 5:42 UTC (permalink / raw)
To: khorenko; +Cc: devel
Patchset for task https://virtuozzo.atlassian.net/browse/VSTOR-155322
NOTE: Merge "ms/mptcp: stability fixes" v4 first:
http://lore.virtuozzo.com/kernel/20261118053958.1022750-1-eva.kurchatova@virtuozzo.com/T/#t
Changes in v2:
- Base on "ms/mptcp: stability fixes" v4; this patch becomes a plain
cherry-pick.
- Patch 2/4: mention the mainline commit 08dfe370239e in the rebase.
Link to v1: http://lore.virtuozzo.com/kernel/179491498385.113083.8710612646167447943.b4-review@b4/T/#t
Paolo Abeni (4):
ms/mptcp: reset rcv wnd on disconnect
ms/mptcp: prevent race between disconnect() and rtx
ms/mptcp: close race between scheduler and state change
ms/mptcp: fix bad accounting in __mptcp_subflow_push_pending()
net/mptcp/protocol.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
--
2.56.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v2 1/4] ms/mptcp: reset rcv wnd on disconnect
2026-11-18 5:42 [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Eva Kurchatova
@ 2026-11-18 5:42 ` Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 2/4] ms/mptcp: prevent race between disconnect() and rtx Eva Kurchatova
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Eva Kurchatova @ 2026-11-18 5:42 UTC (permalink / raw)
To: khorenko; +Cc: devel
From: Paolo Abeni <pabeni@redhat.com>
If the MPTCP socket fallback to TCP before the MP handshake completion,
the IASN remain 0, and the rcv_wnd_sent field is not explicitly
initialized, just incremented over time with the data transfer.
At disconnect time such value is not cleared. If the next connection falls
back to TCP before the MP handshake completion, the data transfer will
keep incrementing the receive window end sequence starting from the last
value used in the previous connection: the announced window will be
unrelated from the actual receiver buffer size and likely too big.
Address the issue zeroing the field at disconnect time.
Fixes: b29fcfb54cd7 ("mptcp: full disconnect implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260515-net-mptcp-misc-fixes-7-1-rc4-v2-4-701e96419f2f@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
(cherry picked from commit 0981f90e1a05773a4c29c6e720f5ea1e3c8f1876)
https://virtuozzo.atlassian.net/browse/VSTOR-155322
Feature: fix ms/net
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
net/mptcp/protocol.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index fc27827dd821..aa0fd53220e6 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3376,6 +3376,7 @@ static int mptcp_disconnect(struct sock *sk, int flags)
/* for fallback's sake */
WRITE_ONCE(msk->ack_seq, 0);
+ atomic64_set(&msk->rcv_wnd_sent, 0);
WRITE_ONCE(sk->sk_shutdown, 0);
sk_error_report(sk);
--
2.56.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v2 2/4] ms/mptcp: prevent race between disconnect() and rtx
2026-11-18 5:42 [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 1/4] ms/mptcp: reset rcv wnd on disconnect Eva Kurchatova
@ 2026-11-18 5:42 ` Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 3/4] ms/mptcp: close race between scheduler and state change Eva Kurchatova
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Eva Kurchatova @ 2026-11-18 5:42 UTC (permalink / raw)
To: khorenko; +Cc: devel
From: Paolo Abeni <pabeni@redhat.com>
Sashiko noted that the two event can race, leading to inconsistent
status. Prevent the race using the synchronous timer stop operation.
Cc: stable@vger.kernel.org
Fixes: b29fcfb54cd7 ("mptcp: full disconnect implementation")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-6-df1de70348b6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 85c580b0d8590520ae00a15c29e9fb9c99427a3e)
Rebase note: this tree lacks commits 9a5e5334adc0 ("tcp: remove
icsk->icsk_retransmit_timer") and 08dfe370239e ("tcp: introduce
icsk->icsk_keepalive_timer"), so the timers stopped are still
icsk_retransmit_timer and sk_timer. It also lacks commit ea4eb2adb0d3
("mptcp: honour configured min/max RTO in retransmit paths"), which
initialises icsk_rto_min, so timer_ival is reset to TCP_RTO_MIN, as in
__mptcp_init_sock() here and in the 6.12.y backport.
https://virtuozzo.atlassian.net/browse/VSTOR-155322
Feature: fix ms/net
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
net/mptcp/protocol.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index aa0fd53220e6..b05047615d19 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3323,6 +3323,7 @@ static void mptcp_copy_inaddrs(struct sock *msk, const struct sock *ssk)
static int mptcp_disconnect(struct sock *sk, int flags)
{
+ struct inet_connection_sock *icsk = inet_csk(sk);
struct mptcp_sock *msk = mptcp_sk(sk);
/* We are on the fastopen error path. We can't call straight into the
@@ -3335,8 +3336,13 @@ static int mptcp_disconnect(struct sock *sk, int flags)
mptcp_check_listen_stop(sk);
mptcp_set_state(sk, TCP_CLOSE);
- mptcp_stop_rtx_timer(sk);
- mptcp_stop_tout_timer(sk);
+ /* The later subflow close can not kick again the tout timer,
+ * as the msk is already in closed status.
+ */
+ msk->timer_ival = TCP_RTO_MIN;
+ sk_stop_timer_sync(sk, &icsk->icsk_retransmit_timer);
+ icsk->icsk_mtup.probe_timestamp = 0;
+ sk_stop_timer_sync(sk, &sk->sk_timer);
mptcp_pm_connection_closed(msk);
--
2.56.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v2 3/4] ms/mptcp: close race between scheduler and state change
2026-11-18 5:42 [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 1/4] ms/mptcp: reset rcv wnd on disconnect Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 2/4] ms/mptcp: prevent race between disconnect() and rtx Eva Kurchatova
@ 2026-11-18 5:42 ` Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 4/4] ms/mptcp: fix bad accounting in __mptcp_subflow_push_pending() Eva Kurchatova
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Eva Kurchatova @ 2026-11-18 5:42 UTC (permalink / raw)
To: khorenko; +Cc: devel
From: Paolo Abeni <pabeni@redhat.com>
The mptcp scheduler may race with subflow sockets state change: data
transmission on the selected socket may fail and a later release could
try to use mss_now reset to 0 for a divide operation.
Address the issue by explicitly checking for the critical scenario.
Fixes: c886d70286bf ("mptcp: do not queue data on closed subflows")
Cc: stable@vger.kernel.org
Reported-by: Shardul Bankar <shardul.b@mpiricsoftware.com>
Reported-by: Xinyang Ge <xinyang@anthropic.com>
Closes: https://lore.kernel.org/20260525194828.1137119-1-shardul.b@mpiricsoftware.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260917-net-mptcp-misc-fixes-7-3-rc4-v2-2-0cf5c72667c8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 42064de57fb83231fcc89663a94885f228a1ee53)
https://virtuozzo.atlassian.net/browse/VSTOR-155322
Feature: fix ms/net
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
net/mptcp/protocol.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index b05047615d19..8cff2bed7231 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1499,7 +1499,9 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
static void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)
{
- tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle, info->size_goal);
+ if (info->mss_now)
+ tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle,
+ info->size_goal);
release_sock(ssk);
}
--
2.56.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Devel] [PATCH hci-8.1 v2 4/4] ms/mptcp: fix bad accounting in __mptcp_subflow_push_pending()
2026-11-18 5:42 [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Eva Kurchatova
` (2 preceding siblings ...)
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 3/4] ms/mptcp: close race between scheduler and state change Eva Kurchatova
@ 2026-11-18 5:42 ` Eva Kurchatova
2026-11-18 10:50 ` [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Konstantin Khorenko
2026-11-18 10:50 ` Konstantin Khorenko
5 siblings, 0 replies; 7+ messages in thread
From: Eva Kurchatova @ 2026-11-18 5:42 UTC (permalink / raw)
To: khorenko; +Cc: devel
From: Paolo Abeni <pabeni@redhat.com>
If __subflow_push_pending() errors out we should avoid updating the
copied byte counters, to avoid mismatch push call later on.
Fixes: 0fa1b3783a17 ("mptcp: use get_send wrapper")
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260917-net-mptcp-misc-fixes-7-3-rc4-v2-3-0cf5c72667c8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit f3ef03357396d4b147d8e76c75fb612c2f264ffc)
https://virtuozzo.atlassian.net/browse/VSTOR-155322
Feature: fix ms/net
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
net/mptcp/protocol.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 8cff2bed7231..26e608355663 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1689,7 +1689,8 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool
ret = __subflow_push_pending(sk, ssk, &info);
if (ret <= 0)
keep_pushing = false;
- copied += ret;
+ else
+ copied += ret;
}
mptcp_for_each_subflow(msk, subflow) {
--
2.56.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes
2026-11-18 5:42 [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Eva Kurchatova
` (3 preceding siblings ...)
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 4/4] ms/mptcp: fix bad accounting in __mptcp_subflow_push_pending() Eva Kurchatova
@ 2026-11-18 10:50 ` Konstantin Khorenko
2026-11-18 10:50 ` Konstantin Khorenko
5 siblings, 0 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-11-18 10:50 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
Applying as is, on top of "ms/mptcp: stability fixes" v4.
On Wed, 18 Nov 2026 07:42:44 +0200, Eva Kurchatova wrote:
> Changes in v2:
> - Base on "ms/mptcp: stability fixes" v4; this patch becomes a plain
> cherry-pick.
> - Patch 2/4: mention the mainline commit 08dfe370239e in the rebase.
1/4, 3/4 and 4/4 now match mainline exactly. For next time: the cover
letter still does not say what the four fixes fix or how they were
tested.
Thanks.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes
2026-11-18 5:42 [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Eva Kurchatova
` (4 preceding siblings ...)
2026-11-18 10:50 ` [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Konstantin Khorenko
@ 2026-11-18 10:50 ` Konstantin Khorenko
5 siblings, 0 replies; 7+ messages in thread
From: Konstantin Khorenko @ 2026-11-18 10:50 UTC (permalink / raw)
To: Eva Kurchatova; +Cc: devel
On Wed, 18 Nov 2026 07:42:44 +0200, Eva Kurchatova wrote:
> ms/mptcp: backport cc-stable fixes
>
> Patchset for task https://virtuozzo.atlassian.net/browse/VSTOR-155322
>
> NOTE: Merge "ms/mptcp: stability fixes" v4 first:
> http://lore.virtuozzo.com/kernel/20261118053958.1022750-1-eva.kurchatova@virtuozzo.com/T/#t
>
> [...]
Applied to branch-rh10-6.12.0-211.75.1.26.x.vz10-ovz, will be released in rh10-6.12.0-211.75.1.26.3.vz10, thanks!
[1/4] ms/mptcp: reset rcv wnd on disconnect
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/e9d8c08da1af
[2/4] ms/mptcp: prevent race between disconnect() and rtx
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/cb7bceca7595
[3/4] ms/mptcp: close race between scheduler and state change
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/9d70072fc514
[4/4] ms/mptcp: fix bad accounting in __mptcp_subflow_push_pending()
https://bitbucket.org/virtuozzocore/vzkernel.vzs/commits/b2aa7372e799
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-18 10:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 5:42 [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 1/4] ms/mptcp: reset rcv wnd on disconnect Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 2/4] ms/mptcp: prevent race between disconnect() and rtx Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 3/4] ms/mptcp: close race between scheduler and state change Eva Kurchatova
2026-11-18 5:42 ` [Devel] [PATCH hci-8.1 v2 4/4] ms/mptcp: fix bad accounting in __mptcp_subflow_push_pending() Eva Kurchatova
2026-11-18 10:50 ` [Devel] [PATCH hci-8.1 v2 0/4] ms/mptcp: backport cc-stable fixes Konstantin Khorenko
2026-11-18 10:50 ` Konstantin Khorenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.