From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794273286; b=xaNYAVcBeyN5XlszXU5cconYii/7eK8W32jziurCJdJ/PcTzXg4YbGgh/F9danIfu53X 8nuTo9pIPth5VAdizYQgk5E29g5w56rTdWfPcWZdOeL+sbXIJalgp7R6OjGjMH5SvkESW 8HBxVUkuLAK+D4QJty7m6K93JeScm6F0UoUuPmYNAa7ePpwVpNeMxBDmkr4zHZ60by+hX 43SdauQEdMKjPbnJ3CmjiK33+NCnEPMZvwRUEfe7MoId6Ob4WyY45fgxzNM2DfwMvAOFr 7WQlu7zertPcMFQDC6SGOG2CuaFC86ZhfqmRKSa0Cgk9eUGV224unzopOlTFlZ2d3tg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794273286; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=kxRMd3ahDHHk8Uzz8PGhiWe4Hc6kEcHQN6vrxVDEa28=; b=bz+GR4H+oXZEQ3nCcMQ4m70xVabsv/g+v8us9ciqMV4m7ymOhuWSDE8AI2iN/9Vwniib /rBSGHqmBVbu0z1tfr288dWHSLxWRkYqiRo690H7epZ/BVAcNV0hzxjUIAcflwtbHPl2C CTthIVUwignE+UpYVp60yJmFqQ7zVYDu6QgAvHTAfWXE+Y6Xus96WYSrFlqhIU3O78D+G Zovx2ijDW5BJWimrshukpASpPeNcgzYmPdBiBBsEXUZ2PQeqcppsRJICrrhoknXouBQHM LXk/Ng9E7n5kgB7PkTA86ckuVcUzXF8h0L/K+ozE2ZGzNPbpawbpllH9IEZoBE2wphg== 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=eQOvhPS+; arc=none smtp.remote-ip=100.103.45.18 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 C97AB606A326 for ; Tue, 10 Nov 2026 01:14:45 +0000 (UTC) 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=eQOvhPS+ Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2BC51F0089F; Tue, 10 Nov 2026 01:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794273285; bh=kxRMd3ahDHHk8Uzz8PGhiWe4Hc6kEcHQN6vrxVDEa28=; h=From:To:Cc:Subject:Date; b=eQOvhPS+x1sSomkiYd+zWO8DMZ60/IztnQxQJcGnsnELJToqykSkqNOy6PTq6FkBF fzeU8PEf6ME1yFYABrDBUSm93s5iy8eCG4J24J2c1Flz5wOWf7T7kmEfW3O1fqMbrL 0+FJLvsQvSB0beQOqp906iIghXkFDhwrufi7mPFpAyr/yjTXDIA2H4nf3NN6v9htI1 rkr/KSkCqSsH+DeBjy5ut+t8kM0gLWnUW5iB188lXDr25VS9Xzg97aXqvNfPtLgEkc kFVJ0FzM3fjk/xbvU2DrquxZsvBCRfeMDZweqB31sTUN1Drfm1GJSkiz0VfxasT0pb 5ShZYtnElpNdg== From: Sasha Levin To: odys.yuan@gmail.com, hch@lst.de, paulmck@kernel.org, kbusch@kernel.org Cc: stable@vger.kernel.org Subject: FAILED: patch "[PATCH] srcu: Add list_splice_init_srcu()" failed to apply to 6.6-stable tree Date: Mon, 9 Nov 2026 20:14:43 -0500 Message-ID: <20261109201443-failed-6.6-d06917d0ba22@kernel.org> X-Mailer: git-send-email 2.53.0 X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-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 . 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.6.y git checkout FETCH_HEAD git cherry-pick -x d06917d0ba226206dbd606330d73a8eb1e3029c1 # git commit -s git send-email --to '' --in-reply-to '20261109201443-failed-6.6-d06917d0ba22@kernel.org' --subject-prefix 'PATCH 6.6.y' 'HEAD^..' Thanks, Sasha ------------------ original commit in Linus's tree ------------------ >From d06917d0ba226206dbd606330d73a8eb1e3029c1 Mon Sep 17 00:00:00 2001 From: Qiliang Yuan Date: Wed, 4 Nov 2026 01:30:39 -0500 Subject: [PATCH] srcu: Add list_splice_init_srcu() list_splice_init_rcu() makes a list look empty to new readers, waits for the current ones with the given sync function, and only then links the entries into the new list. The sync function takes no argument, so it can wait for RCU readers but not for the readers of an srcu_struct. Passing synchronize_rcu() for a list read under SRCU still builds, but leaves SRCU readers on the entries while the last one's next pointer is moved onto the new list head. nvme_remove_namespaces() does this today. Add list_splice_init_srcu(), which waits for the readers of the given srcu_struct instead. Cc: stable@vger.kernel.org Suggested-by: Christoph Hellwig Signed-off-by: Qiliang Yuan Reviewed-by: Paul E. McKenney Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch --- include/linux/srcu.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 1a8a465a5650d..d4dcaeb83e2b6 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -118,6 +119,41 @@ void cleanup_srcu_struct(struct srcu_struct *ssp); void synchronize_srcu(struct srcu_struct *ssp); void synchronize_srcu_atomic(struct srcu_struct *ssp); +/** + * list_splice_init_srcu - splice an SRCU-protected list into an existing list + * @list: the SRCU-protected list to splice + * @head: the place in the existing list to splice the first list into + * @ssp: the srcu_struct that readers of @list use + * + * Like list_splice_init_rcu(), but wait for the SRCU readers of @list + * instead of RCU ones, so that none of them can follow a next pointer + * onto @head. + * + * Note that this function blocks, and that the caller must prevent any + * other updates to @list. + */ +static inline void list_splice_init_srcu(struct list_head *list, + struct list_head *head, + struct srcu_struct *ssp) +{ + struct list_head *first = list->next; + struct list_head *last = list->prev; + struct list_head *next = head->next; + + if (list_empty(list)) + return; + + INIT_LIST_HEAD_RCU(list); + synchronize_srcu(ssp); + ASSERT_EXCLUSIVE_ACCESS(*first); + ASSERT_EXCLUSIVE_ACCESS(*last); + + last->next = next; + rcu_assign_pointer(list_next_rcu(head), first); + first->prev = head; + next->prev = last; +} + #define SRCU_GET_STATE_COMPLETED 0x1 /** -- 2.53.0