* FAILED: patch "[PATCH] mptcp: subflow: no need to copy thmac during ulp_clone" failed to apply to 5.15-stable tree
@ 2026-09-16 16:29 gregkh
2026-09-17 2:58 ` [PATCH 5.15.y 1/2] mptcp: strict local address ID selection Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2026-09-16 16:29 UTC (permalink / raw)
To: matttbe, geliang, kuba; +Cc: stable
The patch below does not apply to the 5.15-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 <stable@vger.kernel.org>.
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-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 29f641951be0d91036d77edf677807f1447dbe65
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026091645-parkway-theorize-2131@gregkh' --subject-prefix 'PATCH 5.15.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 29f641951be0d91036d77edf677807f1447dbe65 Mon Sep 17 00:00:00 2001
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Date: Tue, 8 Sep 2026 16:07:07 +0200
Subject: [PATCH] mptcp: subflow: no need to copy thmac during ulp_clone
'thmac' is not used after that point.
Indeed, subflow_ulp_clone() is called when the request on the passive
side is over, so when the truncated HMAC is no longer needed.
Note that in case of SYN cookies, thmac will not be initialised. So
better to remove it to avoid a warning from debug tools like KMSAN for
reading uninitialised data.
Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
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/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-2-df1de70348b6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index af81ad5e699d..01db7edce18a 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -2084,7 +2084,6 @@ static void subflow_ulp_clone(const struct request_sock *req,
new_ctx->request_bkup = subflow_req->request_bkup;
WRITE_ONCE(new_ctx->remote_id, subflow_req->remote_id);
new_ctx->token = subflow_req->token;
- new_ctx->thmac = subflow_req->thmac;
/* the subflow req id is valid, fetched via subflow_check_req()
* and subflow_token_join_request()
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 5.15.y 1/2] mptcp: strict local address ID selection
2026-09-16 16:29 FAILED: patch "[PATCH] mptcp: subflow: no need to copy thmac during ulp_clone" failed to apply to 5.15-stable tree gregkh
@ 2026-09-17 2:58 ` Sasha Levin
2026-09-17 2:58 ` [PATCH 5.15.y 2/2] mptcp: subflow: no need to copy thmac during ulp_clone Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2026-09-17 2:58 UTC (permalink / raw)
To: stable; +Cc: Paolo Abeni, Mat Martineau, Jakub Kicinski, Sasha Levin
From: Paolo Abeni <pabeni@redhat.com>
[ Upstream commit 4cf86ae84c718333928fd2d43168a1e359a28329 ]
The address ID selection for MPJ subflows created in response
to incoming ADD_ADDR option is currently unreliable: it happens
at MPJ socket creation time, when the local address could be
unknown.
Additionally, if the no local endpoint is available for the local
address, a new dummy endpoint is created, confusing the user-land.
This change refactor the code to move the address ID selection inside
the rebuild_header() helper, when the local address eventually
selected by the route lookup is finally known. If the address used
is not mapped by any endpoint - and thus can't be advertised/removed
pick the id 0 instead of allocate a new endpoint.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
[5.15 dependency adaptation]
Retain only the passive MP_JOIN clone preparation needed for
29f641951be0d91036d77edf677807f1447dbe65 ("mptcp: subflow: no need to
copy thmac during ulp_clone"). Move the existing local_id assignment
below thmac and retain the upstream comment about the validated request
ID. Use the existing direct assignment instead of adding
subflow_set_local_id(), and match the target's adjacent WRITE_ONCE()
remote_id assignment so its unmodified patch applies cleanly.
Omit the active-open address selection refactor, rebuild_header hooks,
local_id_valid field and initialization, and path-manager changes. They
are unnecessary for the thmac fix and would require new helper functions.
The stable branch's existing address selection and initialization are
preserved. This preparatory dependency intentionally leaves the thmac
copy in place for the target commit to remove.
[ sashal: Reduced backport -- upstream 4cf86ae84c718 touches 4 file(s), this
backport carries 1. Not backported here:
net/mptcp/pm_netlink.c
net/mptcp/protocol.c
net/mptcp/protocol.h
This note is generated from the file lists only; see the resolution record
for the reasoning. ]
Stable-dep-of: 29f641951be0 ("mptcp: subflow: no need to copy thmac during ulp_clone")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mptcp/subflow.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 33b16ea7ae5bc..adcda90d6a532 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -1802,10 +1802,14 @@ static void subflow_ulp_clone(const struct request_sock *req,
new_ctx->fully_established = 1;
new_ctx->backup = subflow_req->backup;
new_ctx->request_bkup = subflow_req->request_bkup;
- new_ctx->local_id = subflow_req->local_id;
- new_ctx->remote_id = subflow_req->remote_id;
+ WRITE_ONCE(new_ctx->remote_id, subflow_req->remote_id);
new_ctx->token = subflow_req->token;
new_ctx->thmac = subflow_req->thmac;
+
+ /* the subflow req id is valid, fetched via subflow_check_req()
+ * and subflow_token_join_request()
+ */
+ new_ctx->local_id = subflow_req->local_id;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 5.15.y 2/2] mptcp: subflow: no need to copy thmac during ulp_clone
2026-09-17 2:58 ` [PATCH 5.15.y 1/2] mptcp: strict local address ID selection Sasha Levin
@ 2026-09-17 2:58 ` Sasha Levin
0 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-09-17 2:58 UTC (permalink / raw)
To: stable; +Cc: Matthieu Baerts (NGI0), Geliang Tang, Jakub Kicinski, Sasha Levin
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
[ Upstream commit 29f641951be0d91036d77edf677807f1447dbe65 ]
'thmac' is not used after that point.
Indeed, subflow_ulp_clone() is called when the request on the passive
side is over, so when the truncated HMAC is no longer needed.
Note that in case of SYN cookies, thmac will not be initialised. So
better to remove it to avoid a warning from debug tools like KMSAN for
reading uninitialised data.
Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests")
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/20260908-net-mptcp-misc-fixes-7-3-rc1-v2-2-df1de70348b6@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mptcp/subflow.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index adcda90d6a532..486777bf36381 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -1804,7 +1804,6 @@ static void subflow_ulp_clone(const struct request_sock *req,
new_ctx->request_bkup = subflow_req->request_bkup;
WRITE_ONCE(new_ctx->remote_id, subflow_req->remote_id);
new_ctx->token = subflow_req->token;
- new_ctx->thmac = subflow_req->thmac;
/* the subflow req id is valid, fetched via subflow_check_req()
* and subflow_token_join_request()
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-17 2:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-16 16:29 FAILED: patch "[PATCH] mptcp: subflow: no need to copy thmac during ulp_clone" failed to apply to 5.15-stable tree gregkh
2026-09-17 2:58 ` [PATCH 5.15.y 1/2] mptcp: strict local address ID selection Sasha Levin
2026-09-17 2:58 ` [PATCH 5.15.y 2/2] mptcp: subflow: no need to copy thmac during ulp_clone Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox