From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: khorenko@virtuozzo.com, vladimir.riabchun@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.2 1/4] ms/mptcp: only reset subflow errors when propagated
Date: Thu, 19 Nov 2026 08:32:26 +0200 [thread overview]
Message-ID: <20261119063525.1233606-2-eva.kurchatova@virtuozzo.com> (raw)
In-Reply-To: <20261119063525.1233606-1-eva.kurchatova@virtuozzo.com>
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
commit dccf46179ddd6c04c14be8ed584dc54665f53f0e upstream.
Some subflow socket errors need to be reported to the MPTCP socket: the
initial subflow connect (MP_CAPABLE), and the ones from the fallback
sockets. The others are not propagated.
The issue is that sock_error() was used to retrieve the error, which was
also resetting the sk_err field. Because of that, when notifying the
userspace about subflow close events later on from the MPTCP worker, the
ssk->sk_err field was always 0.
Now, the error (sk_err) is only reset when propagating it to the msk.
Fixes: 15cc10453398 ("mptcp: deliver ssk errors to msk")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-3-7f71e1bc4feb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 64b243f5bc889f3eda7a0a3e2b36c4d616d323de)
https://virtuozzo.atlassian.net/browse/VSTOR-155530
Feature: fix ms/net
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
net/mptcp/protocol.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 26e608355663..411d2e2b3737 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -771,11 +771,8 @@ static bool __mptcp_ofo_queue(struct mptcp_sock *msk)
static bool __mptcp_subflow_error_report(struct sock *sk, struct sock *ssk)
{
- int err = sock_error(ssk);
int ssk_state;
-
- if (!err)
- return false;
+ int err;
/* only propagate errors on fallen-back sockets or
* on MPC connect
@@ -783,6 +780,10 @@ static bool __mptcp_subflow_error_report(struct sock *sk, struct sock *ssk)
if (sk->sk_state != TCP_SYN_SENT && !__mptcp_check_fallback(mptcp_sk(sk)))
return false;
+ err = sock_error(ssk);
+ if (!err)
+ return false;
+
/* We need to propagate only transition to CLOSE state.
* Orphaned socket will see such state change via
* subflow_sched_work_if_closed() and that path will properly
--
2.56.1
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-11-19 6:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 6:32 [Devel] [PATCH hci-8.2 0/4] ms/mptcp: backport msk refcount fixes Eva Kurchatova
2026-11-19 6:32 ` Eva Kurchatova [this message]
2026-11-19 6:38 ` [Devel] [PATCH hci-8.2 1/4] ms/mptcp: only reset subflow errors when propagated no-reply
2026-11-19 17:09 ` Konstantin Khorenko
2026-11-19 6:32 ` [Devel] [PATCH hci-8.2 2/4] ms/refcount: provide ops for cases when object's memory can be reused Eva Kurchatova
2026-11-19 6:38 ` no-reply
2026-11-19 17:09 ` Konstantin Khorenko
2026-11-19 6:32 ` [Devel] [PATCH hci-8.2 3/4] ms/mptcp: hold MP_JOIN msk ref when cloning reqsk Eva Kurchatova
2026-11-19 6:41 ` no-reply
2026-11-19 17:09 ` Konstantin Khorenko
2026-11-19 6:32 ` [Devel] [PATCH hci-8.2 4/4] ms/mptcp: fix MP_CAPABLE token migration " Eva Kurchatova
2026-11-19 6:42 ` no-reply
2026-11-19 17:09 ` Konstantin Khorenko
2026-11-19 17:09 ` [Devel] [PATCH hci-8.2 0/4] ms/mptcp: backport msk refcount fixes Konstantin Khorenko
2026-11-19 17:10 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119063525.1233606-2-eva.kurchatova@virtuozzo.com \
--to=eva.kurchatova@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
--cc=vladimir.riabchun@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox