Article View: linux.kernel.netdev
Article #27146[PATCH net-next 01/10] mptcp: pm: work on a copy of the received RM_ADDR list
From: "Matthieu Baerts (NGI0)"
Date: Fri, 04 Dec 2026 21:44
Date: Fri, 04 Dec 2026 21:44
46 lines
10138 bytes
10138 bytes
From: Josef Bacik <josef@toxicpanda.com>
The worker clears MPTCP_PM_RM_ADDR_RECEIVED and walks pm.rm_list_rx in
place. For every subflow it closes, mptcp_pm_rm_addr_or_subflow() drops
pm.lock. If the peer's next RM_ADDR arrives then, the flag is clear and
mptcp_pm_rm_addr_received() overwrites the list. The walk goes on at
its index in the new list: the ids of the first list that were still to
come are never handled, and their subflows stay.
Hand a copy of the list to the walk.
This issue has been found with the help of an LLM. It has not been
reproduced: the next RM_ADDR has to be processed while the worker has
dropped pm.lock to close a subflow, a window that a Packetdrill script
cannot target. This fix is based on code inspection only, which is
acceptable here: it is simple, and the issue is clear from the code.
Fixes: d0b698ca9a27 ("mptcp: remove multi addresses in PM")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[ Commit message: how the issue was found, and why it is fine without
a reproducer. ]
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
net/mptcp/pm.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index b0b71adefb8f..fd8dc1132ad1 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -827,7 +827,10 @@ static void mptcp_pm_rm_addr_or_subflow(struct mptcp_sock *msk,
static void mptcp_pm_rm_addr_recv(struct mptcp_sock *msk)
{
- mptcp_pm_rm_addr_or_subflow(msk, &msk->pm.rm_list_rx, MPTCP_MIB_RMADDR);
+ /* pm.lock is dropped on the way: the next RM_ADDR may come in */
+ struct mptcp_rm_list rm_list = msk->pm.rm_list_rx;
+
+ mptcp_pm_rm_addr_or_subflow(msk, &rm_list, MPTCP_MIB_RMADDR);
}
void mptcp_pm_rm_subflow(struct mptcp_sock *msk,
--
2.55.0
Technical Details
Message-ID:
<20261204-net-next-mptcp-misc-feat-7-5-v1-1-1449de51adae@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377650-linux-kernel-netdev=dewy.ruReferences:
<20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377650-linux-kernel-netdev=dewy.ru
From: matttbe@kernel.org ("Matthieu Baerts (NGI0)")
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next 01/10] mptcp: pm: work on a copy of the received
RM_ADDR list
Date: Fri, 04 Dec 2026 22:44:33 +0100
Organization: Usenet Network
Message-ID: <20261204-net-next-mptcp-misc-feat-7-5-v1-1-1449de51adae@kernel.org>
References: <20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="2878178"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:0KWZTIuFsEn4NBlJRBsMYOwVg5s= sha256:gGTd5tISbdn2mW1EUa3QdMBP55StkY2KV/9PwjchlLY=
sha1:6hRqbQqM+9k+pvZErfMaxHYpnDQ= sha256:1jK+hwpsuxPyPBy2Nkvh4Oy6RDSnUFN39KmJaHvWq9I=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 7AD8E117A66; Sat, 5 Dec 2026 00:45:17 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.642
X-Spam-Status: No, score=-3.642 tagged_above=-9999 required=6.31
tests=[DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id QY4yRBmeTHuv;
Sat, 5 Dec 2026 00:45:14 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-377650-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 29C82117CED; Sat, 5 Dec 2026 00:45:03 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id 3FD2B608976; Fri, 4 Dec 2026 21:45:03 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796420702;
b=TOGWElW2M4soyRCckDVjIPY800laysQe+JxcvbCWZQi47FUcgaJwfo8zS02KDNjq+rVY
X6pEpa1/VHFcYusLH4fvPkpf3FLOnGr6pF1DTGm7gApl8gb5MegDl5sL2iarYLP6Wu1uX
ZcTYDtSQhmkRukhnAIJUWznGo0g9VHxogTx7UQ/rEXvjXR+2x6iywUyb28kIIfTvEMXYv
GorE/WISgw8LhlO/XDm7fnwa0qUfKnIURLQdx2nvVyqAjnRZmuf5xO6hQDe0SJ8oyd19N
C+ziNsjAVXvquy3+22XTjH3OiZbCzQCZUwPZ08LBq3AfbXjyWbm5yjPgLp4JeAxwS8g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796420702;
h=X-Original-To:Received:Received:DKIM-Signature:From:Date:Subject:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc:
X-Mailer:X-Developer-Signature:X-Developer-Key;
bh=EQyiYkdt4kUjgRTp+HmrnKm4lVGUpFtZ9riYRMnhwKw=;
b=KRI8lRtpnXzpa6Hdx1eyyYHN8YoaSHU1xSSqwOmspolI6UqSN9Wso7S9WGN5CuF0Zll9
gHKbgW+yyx2ixBWKrtGfdBOJzC1vRFZU2JVCr/+biCuqofKUn+BE81+zAOu5JOc9kPrvY
k9Vcdk+4UFT1vBvJa7mFuiq5q0tdl3uPVVK7bBU1Dejq0H1jsoBsMktJBUOT+Um/f4x4r
zeQp/FQaHzpDXvOYsgtCX88MYlcXXc5Q2wTzfVmzy8szsauAwnivSZwWmVBoWXwjaWT+e
uUDlEa9QpKG+vWQro22HFgO+QiLPEbMZWhyjYiKEADwVhEHYqxLzYpj7obuUagmitWg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="AR4w2n/F";
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 56523606A684;
Fri, 4 Dec 2026 21:45:02 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AR4w2n/F
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796420701;
b=G0T7gEA8KKycUtV+WydPOl2sPwOTjLVNpmgls7kZl+MpjuA4/uDGRetTn01xMkCd5tED
tSNVUKz/Mwvn5HGM7j17Y4oiU2jQHC3dFtABZLlTYzSCwbSpyZEUVjdQ8UJGnXpkKT6nk
+Q8lbWWE3mNLFBIDGUwMBfcOj9IUG1RD7fk0VEHomxPUgwIbwfSDorcu09ARt075Bsah8
16FTKap0PUPDeJLSk48X8Q6HsAZjPSGgDIRzNTbuE8iQQf5JjapvYKfSt6G8+iKrEuSjz
vySbsb6KlEoNk6v4RLyFN2+6xot/axhaH3mHVuua4eUlYz64+/WLknI+NLSvQz92B2w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796420701;
h=Received:DKIM-Signature:From:Date:Subject:MIME-Version:Content-Type:
Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc:
X-Mailer:X-Developer-Signature:X-Developer-Key;
bh=EQyiYkdt4kUjgRTp+HmrnKm4lVGUpFtZ9riYRMnhwKw=;
b=TL3TV5+ONvkiY8E/jh0q0gmSrMhJKH/P1R55etDp5gZe1ei17Me69jcf9ewDZrFjSUEp
2/fObHusvKJpOhKXGgaifhuEn9fUIid8uEUq84F0NPqpHwXfpoLRifxHnyjTHL6NuTfTY
KuBDBZlLDCO6heF/7dIOILPphX/+EXUjeAZOFoHsTifVnbnwQYCJ7tNr0XoawR0SoWKfG
A6LemDjTmtCXRNKLiEtfx3JZtJTN8MTXxtRRt/mGlbqGxKVvSjotyLJZuuHKbQjxDaosI
H6kCmWWAhqBlL4iIZ+awJiU4Jvlqnzl8YHkfHh3wcsKMLxeu8DlnTmOr1HL5jY7tQag==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="AR4w2n/F";
arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 742E7606A335;
Fri, 4 Dec 2026 21:45:01 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id A66E01F0093B;
Fri, 4 Dec 2026 21:44:58 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1796420701;
bh=EQyiYkdt4kUjgRTp+HmrnKm4lVGUpFtZ9riYRMnhwKw=;
h=From:Date:Subject:References:In-Reply-To:To:Cc;
b=AR4w2n/FQ3QykkOjNuH7fgoB+pt2qYhIhc09HVZkejmbnjg90CWXNNhsKH3z21CCs
OGIdii/KIsp2lt8opms39QX6+Q2Kg+6Gw9PwG/SvBdo0AT29B+R3BM/3hjOpm3D88f
AB0diPSh0axrD4btUjU4wSoxtelCbB7mXBqm0Vm5SIgOkUeNswQkzxekZg7Sh2Sr/e
dPlBOGnkdzznFJ4EiDrJeHijth+HjR4Z5DFfm8BhRkjC73iXHd0DFx9f1BeBYDK9E9
PTWdGyGC53EfT9w3gMQgVhyrhyIonyT7syBzS6IpXdMU+eJObkxXwODCpCRatpn5Bq
I/hmEtOKYPBZg==
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261204-net-next-mptcp-misc-feat-7-5-v1-0-1449de51adae@kernel.org>
X-Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
linux-kselftest@vger.kernel.org,
"Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
Josef Bacik <josef@toxicpanda.com>
X-Mailer: b4 0.16.0
X-Developer-Signature: v=1; a=openpgp-sha256; l=1776; i=matttbe@kernel.org;
h=from:subject:message-id; bh=FYWgSN/HZYiP7mbZlY7nCrQtvTZG2zpLSOcJzsPWYN4=;
b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGLKFTfxrG08Jyl4SbRNh3uNz62jDx8OTGyxaVG/a1ertL
Ju9y+5HRykLgxgXg6yYIot0W2T+zOdVvCVefhYwc1iZQIYwcHEKwETMuhkZlp/ya6iXvCQxt0j8
F/eV9mcsJjE8XUXixce2Miif7YpVZWRoCZOr+F72eN72yUeC9wpM96p7vuLp1obLKSal6x6ri2p
zAgA=
X-Developer-Key: i=matttbe@kernel.org; a=openpgp;
fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073