]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop srcu tiny patch for 6.18 and older master
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Apr 2026 16:10:08 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Apr 2026 16:10:08 +0000 (18:10 +0200)
12 files changed:
queue-5.10/series
queue-5.10/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch [deleted file]
queue-5.15/series
queue-5.15/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch [deleted file]
queue-6.1/series
queue-6.1/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch [deleted file]
queue-6.12/series
queue-6.12/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch [deleted file]
queue-6.18/series
queue-6.18/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch [deleted file]
queue-6.6/series
queue-6.6/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch [deleted file]

index 4b445358ca2e5ad01059159e8b644348abd5f771..74c1b215db9b1293c19f276e13937a4a1661e947 100644 (file)
@@ -3,7 +3,6 @@ asoc-sof-topology-reject-invalid-vendor-array-size-i.patch
 can-mcp251x-add-error-handling-for-power-enable-in-o.patch
 btrfs-tracepoints-get-correct-superblock-from-dentry.patch
 alsa-hda-realtek-add-mute-led-quirk-for-hp-pavilion-.patch
-srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
 netfilter-nft_set_pipapo_avx2-don-t-return-non-match.patch
 wifi-wl1251-validate-packet-ids-before-indexing-tx_f.patch
 asoc-soc-core-call-missing-init_list_head-for-card_a.patch
diff --git a/queue-5.10/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch b/queue-5.10/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
deleted file mode 100644 (file)
index c00c846..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-From 64e2c425983d9dc106dbbb935f6dd6ecd281f8c9 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 23 Mar 2026 20:14:18 -0400
-Subject: srcu: Use irq_work to start GP in tiny SRCU
-
-From: Joel Fernandes <joelagnelf@nvidia.com>
-
-[ Upstream commit a6fc88b22bc8d12ad52e8412c667ec0f5bf055af ]
-
-Tiny SRCU's srcu_gp_start_if_needed() directly calls schedule_work(),
-which acquires the workqueue pool->lock.
-
-This causes a lockdep splat when call_srcu() is called with a scheduler
-lock held, due to:
-
-  call_srcu() [holding pi_lock]
-    srcu_gp_start_if_needed()
-      schedule_work() -> pool->lock
-
-  workqueue_init() / create_worker() [holding pool->lock]
-    wake_up_process() -> try_to_wake_up() -> pi_lock
-
-Also add irq_work_sync() to cleanup_srcu_struct() to prevent a
-use-after-free if a queued irq_work fires after cleanup begins.
-
-Tested with rcutorture SRCU-T and no lockdep warnings.
-
-[ Thanks to Boqun for similar fix in patch "rcu: Use an intermediate irq_work
-to start process_srcu()" ]
-
-Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
-Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
-Signed-off-by: Boqun Feng <boqun@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- include/linux/srcutiny.h |  4 ++++
- kernel/rcu/srcutiny.c    | 19 ++++++++++++++++++-
- 2 files changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
-index 0e0cf4d6a72a0..0419b3b9664a8 100644
---- a/include/linux/srcutiny.h
-+++ b/include/linux/srcutiny.h
-@@ -11,6 +11,7 @@
- #ifndef _LINUX_SRCU_TINY_H
- #define _LINUX_SRCU_TINY_H
-+#include <linux/irq_work_types.h>
- #include <linux/swait.h>
- struct srcu_struct {
-@@ -24,18 +25,21 @@ struct srcu_struct {
-       struct rcu_head *srcu_cb_head;  /* Pending callbacks: Head. */
-       struct rcu_head **srcu_cb_tail; /* Pending callbacks: Tail. */
-       struct work_struct srcu_work;   /* For driving grace periods. */
-+      struct irq_work srcu_irq_work;  /* Defer schedule_work() to irq work. */
- #ifdef CONFIG_DEBUG_LOCK_ALLOC
-       struct lockdep_map dep_map;
- #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
- };
- void srcu_drive_gp(struct work_struct *wp);
-+void srcu_tiny_irq_work(struct irq_work *irq_work);
- #define __SRCU_STRUCT_INIT(name, __ignored)                           \
- {                                                                     \
-       .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq),        \
-       .srcu_cb_tail = &name.srcu_cb_head,                             \
-       .srcu_work = __WORK_INITIALIZER(name.srcu_work, srcu_drive_gp), \
-+      .srcu_irq_work = { .func = srcu_tiny_irq_work },                \
-       __SRCU_DEP_MAP_INIT(name)                                       \
- }
-diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
-index 26344dc6483b0..427cc2f1c5b02 100644
---- a/kernel/rcu/srcutiny.c
-+++ b/kernel/rcu/srcutiny.c
-@@ -9,6 +9,7 @@
-  */
- #include <linux/export.h>
-+#include <linux/irq_work.h>
- #include <linux/mutex.h>
- #include <linux/preempt.h>
- #include <linux/rcupdate_wait.h>
-@@ -37,6 +38,7 @@ static int init_srcu_struct_fields(struct srcu_struct *ssp)
-       ssp->srcu_idx_max = 0;
-       INIT_WORK(&ssp->srcu_work, srcu_drive_gp);
-       INIT_LIST_HEAD(&ssp->srcu_work.entry);
-+      init_irq_work(&ssp->srcu_irq_work, srcu_tiny_irq_work);
-       return 0;
- }
-@@ -80,6 +82,7 @@ EXPORT_SYMBOL_GPL(init_srcu_struct);
- void cleanup_srcu_struct(struct srcu_struct *ssp)
- {
-       WARN_ON(ssp->srcu_lock_nesting[0] || ssp->srcu_lock_nesting[1]);
-+      irq_work_sync(&ssp->srcu_irq_work);
-       flush_work(&ssp->srcu_work);
-       WARN_ON(ssp->srcu_gp_running);
-       WARN_ON(ssp->srcu_gp_waiting);
-@@ -155,6 +158,20 @@ void srcu_drive_gp(struct work_struct *wp)
- }
- EXPORT_SYMBOL_GPL(srcu_drive_gp);
-+/*
-+ * Use an irq_work to defer schedule_work() to avoid acquiring the workqueue
-+ * pool->lock while the caller might hold scheduler locks, causing lockdep
-+ * splats due to workqueue_init() doing a wakeup.
-+ */
-+void srcu_tiny_irq_work(struct irq_work *irq_work)
-+{
-+      struct srcu_struct *ssp;
-+
-+      ssp = container_of(irq_work, struct srcu_struct, srcu_irq_work);
-+      schedule_work(&ssp->srcu_work);
-+}
-+EXPORT_SYMBOL_GPL(srcu_tiny_irq_work);
-+
- static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
- {
-       unsigned short cookie;
-@@ -165,7 +182,7 @@ static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
-       WRITE_ONCE(ssp->srcu_idx_max, cookie);
-       if (!READ_ONCE(ssp->srcu_gp_running)) {
-               if (likely(srcu_init_done))
--                      schedule_work(&ssp->srcu_work);
-+                      irq_work_queue(&ssp->srcu_irq_work);
-               else if (list_empty(&ssp->srcu_work.entry))
-                       list_add(&ssp->srcu_work.entry, &srcu_boot_list);
-       }
--- 
-2.53.0
-
index f3c877b1dac7378c8d7cd048172191f6da07b534..7c9839f3084c48952bea05a036c1511aafc20811 100644 (file)
@@ -3,7 +3,6 @@ asoc-sof-topology-reject-invalid-vendor-array-size-i.patch
 can-mcp251x-add-error-handling-for-power-enable-in-o.patch
 btrfs-tracepoints-get-correct-superblock-from-dentry.patch
 alsa-hda-realtek-add-mute-led-quirk-for-hp-pavilion-.patch
-srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
 netfilter-nft_set_pipapo_avx2-don-t-return-non-match.patch
 wifi-wl1251-validate-packet-ids-before-indexing-tx_f.patch
 asoc-soc-core-call-missing-init_list_head-for-card_a.patch
diff --git a/queue-5.15/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch b/queue-5.15/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
deleted file mode 100644 (file)
index b937609..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-From 5efe1d8f2b1319e92136ce32ebcf1ad65ed65431 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 23 Mar 2026 20:14:18 -0400
-Subject: srcu: Use irq_work to start GP in tiny SRCU
-
-From: Joel Fernandes <joelagnelf@nvidia.com>
-
-[ Upstream commit a6fc88b22bc8d12ad52e8412c667ec0f5bf055af ]
-
-Tiny SRCU's srcu_gp_start_if_needed() directly calls schedule_work(),
-which acquires the workqueue pool->lock.
-
-This causes a lockdep splat when call_srcu() is called with a scheduler
-lock held, due to:
-
-  call_srcu() [holding pi_lock]
-    srcu_gp_start_if_needed()
-      schedule_work() -> pool->lock
-
-  workqueue_init() / create_worker() [holding pool->lock]
-    wake_up_process() -> try_to_wake_up() -> pi_lock
-
-Also add irq_work_sync() to cleanup_srcu_struct() to prevent a
-use-after-free if a queued irq_work fires after cleanup begins.
-
-Tested with rcutorture SRCU-T and no lockdep warnings.
-
-[ Thanks to Boqun for similar fix in patch "rcu: Use an intermediate irq_work
-to start process_srcu()" ]
-
-Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
-Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
-Signed-off-by: Boqun Feng <boqun@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- include/linux/srcutiny.h |  4 ++++
- kernel/rcu/srcutiny.c    | 19 ++++++++++++++++++-
- 2 files changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
-index 6cfaa0a9a9b96..db649b742fad5 100644
---- a/include/linux/srcutiny.h
-+++ b/include/linux/srcutiny.h
-@@ -11,6 +11,7 @@
- #ifndef _LINUX_SRCU_TINY_H
- #define _LINUX_SRCU_TINY_H
-+#include <linux/irq_work_types.h>
- #include <linux/swait.h>
- struct srcu_struct {
-@@ -24,18 +25,21 @@ struct srcu_struct {
-       struct rcu_head *srcu_cb_head;  /* Pending callbacks: Head. */
-       struct rcu_head **srcu_cb_tail; /* Pending callbacks: Tail. */
-       struct work_struct srcu_work;   /* For driving grace periods. */
-+      struct irq_work srcu_irq_work;  /* Defer schedule_work() to irq work. */
- #ifdef CONFIG_DEBUG_LOCK_ALLOC
-       struct lockdep_map dep_map;
- #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
- };
- void srcu_drive_gp(struct work_struct *wp);
-+void srcu_tiny_irq_work(struct irq_work *irq_work);
- #define __SRCU_STRUCT_INIT(name, __ignored)                           \
- {                                                                     \
-       .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq),        \
-       .srcu_cb_tail = &name.srcu_cb_head,                             \
-       .srcu_work = __WORK_INITIALIZER(name.srcu_work, srcu_drive_gp), \
-+      .srcu_irq_work = { .func = srcu_tiny_irq_work },                \
-       __SRCU_DEP_MAP_INIT(name)                                       \
- }
-diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
-index a0ba2ed49bc61..f51436aab1951 100644
---- a/kernel/rcu/srcutiny.c
-+++ b/kernel/rcu/srcutiny.c
-@@ -9,6 +9,7 @@
-  */
- #include <linux/export.h>
-+#include <linux/irq_work.h>
- #include <linux/mutex.h>
- #include <linux/preempt.h>
- #include <linux/rcupdate_wait.h>
-@@ -37,6 +38,7 @@ static int init_srcu_struct_fields(struct srcu_struct *ssp)
-       ssp->srcu_idx_max = 0;
-       INIT_WORK(&ssp->srcu_work, srcu_drive_gp);
-       INIT_LIST_HEAD(&ssp->srcu_work.entry);
-+      init_irq_work(&ssp->srcu_irq_work, srcu_tiny_irq_work);
-       return 0;
- }
-@@ -80,6 +82,7 @@ EXPORT_SYMBOL_GPL(init_srcu_struct);
- void cleanup_srcu_struct(struct srcu_struct *ssp)
- {
-       WARN_ON(ssp->srcu_lock_nesting[0] || ssp->srcu_lock_nesting[1]);
-+      irq_work_sync(&ssp->srcu_irq_work);
-       flush_work(&ssp->srcu_work);
-       WARN_ON(ssp->srcu_gp_running);
-       WARN_ON(ssp->srcu_gp_waiting);
-@@ -155,6 +158,20 @@ void srcu_drive_gp(struct work_struct *wp)
- }
- EXPORT_SYMBOL_GPL(srcu_drive_gp);
-+/*
-+ * Use an irq_work to defer schedule_work() to avoid acquiring the workqueue
-+ * pool->lock while the caller might hold scheduler locks, causing lockdep
-+ * splats due to workqueue_init() doing a wakeup.
-+ */
-+void srcu_tiny_irq_work(struct irq_work *irq_work)
-+{
-+      struct srcu_struct *ssp;
-+
-+      ssp = container_of(irq_work, struct srcu_struct, srcu_irq_work);
-+      schedule_work(&ssp->srcu_work);
-+}
-+EXPORT_SYMBOL_GPL(srcu_tiny_irq_work);
-+
- static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
- {
-       unsigned short cookie;
-@@ -165,7 +182,7 @@ static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
-       WRITE_ONCE(ssp->srcu_idx_max, cookie);
-       if (!READ_ONCE(ssp->srcu_gp_running)) {
-               if (likely(srcu_init_done))
--                      schedule_work(&ssp->srcu_work);
-+                      irq_work_queue(&ssp->srcu_irq_work);
-               else if (list_empty(&ssp->srcu_work.entry))
-                       list_add(&ssp->srcu_work.entry, &srcu_boot_list);
-       }
--- 
-2.53.0
-
index a6bfb839deb7cb4a5377fcbbc934ea775d56475c..23b8b1f93c12fbe0ca613004d0911920e0d134b5 100644 (file)
@@ -7,7 +7,6 @@ asoc-sof-topology-reject-invalid-vendor-array-size-i.patch
 can-mcp251x-add-error-handling-for-power-enable-in-o.patch
 btrfs-tracepoints-get-correct-superblock-from-dentry.patch
 alsa-hda-realtek-add-mute-led-quirk-for-hp-pavilion-.patch
-srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
 netfilter-nft_set_pipapo_avx2-don-t-return-non-match.patch
 alsa-hda-realtek-add-quirk-for-framework-f111-000f.patch
 wifi-wl1251-validate-packet-ids-before-indexing-tx_f.patch
diff --git a/queue-6.1/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch b/queue-6.1/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
deleted file mode 100644 (file)
index c79f576..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-From 23a2bb06dfb4a8f3ed5996cb57df6f5eb7aa53e6 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 23 Mar 2026 20:14:18 -0400
-Subject: srcu: Use irq_work to start GP in tiny SRCU
-
-From: Joel Fernandes <joelagnelf@nvidia.com>
-
-[ Upstream commit a6fc88b22bc8d12ad52e8412c667ec0f5bf055af ]
-
-Tiny SRCU's srcu_gp_start_if_needed() directly calls schedule_work(),
-which acquires the workqueue pool->lock.
-
-This causes a lockdep splat when call_srcu() is called with a scheduler
-lock held, due to:
-
-  call_srcu() [holding pi_lock]
-    srcu_gp_start_if_needed()
-      schedule_work() -> pool->lock
-
-  workqueue_init() / create_worker() [holding pool->lock]
-    wake_up_process() -> try_to_wake_up() -> pi_lock
-
-Also add irq_work_sync() to cleanup_srcu_struct() to prevent a
-use-after-free if a queued irq_work fires after cleanup begins.
-
-Tested with rcutorture SRCU-T and no lockdep warnings.
-
-[ Thanks to Boqun for similar fix in patch "rcu: Use an intermediate irq_work
-to start process_srcu()" ]
-
-Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
-Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
-Signed-off-by: Boqun Feng <boqun@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- include/linux/srcutiny.h |  4 ++++
- kernel/rcu/srcutiny.c    | 19 ++++++++++++++++++-
- 2 files changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
-index 5aa5e0faf6a12..a351d0a365c4b 100644
---- a/include/linux/srcutiny.h
-+++ b/include/linux/srcutiny.h
-@@ -11,6 +11,7 @@
- #ifndef _LINUX_SRCU_TINY_H
- #define _LINUX_SRCU_TINY_H
-+#include <linux/irq_work_types.h>
- #include <linux/swait.h>
- struct srcu_struct {
-@@ -24,18 +25,21 @@ struct srcu_struct {
-       struct rcu_head *srcu_cb_head;  /* Pending callbacks: Head. */
-       struct rcu_head **srcu_cb_tail; /* Pending callbacks: Tail. */
-       struct work_struct srcu_work;   /* For driving grace periods. */
-+      struct irq_work srcu_irq_work;  /* Defer schedule_work() to irq work. */
- #ifdef CONFIG_DEBUG_LOCK_ALLOC
-       struct lockdep_map dep_map;
- #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
- };
- void srcu_drive_gp(struct work_struct *wp);
-+void srcu_tiny_irq_work(struct irq_work *irq_work);
- #define __SRCU_STRUCT_INIT(name, __ignored)                           \
- {                                                                     \
-       .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq),        \
-       .srcu_cb_tail = &name.srcu_cb_head,                             \
-       .srcu_work = __WORK_INITIALIZER(name.srcu_work, srcu_drive_gp), \
-+      .srcu_irq_work = { .func = srcu_tiny_irq_work },                \
-       __SRCU_DEP_MAP_INIT(name)                                       \
- }
-diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
-index 5e7f336baa06a..9c416bfe6cc80 100644
---- a/kernel/rcu/srcutiny.c
-+++ b/kernel/rcu/srcutiny.c
-@@ -9,6 +9,7 @@
-  */
- #include <linux/export.h>
-+#include <linux/irq_work.h>
- #include <linux/mutex.h>
- #include <linux/preempt.h>
- #include <linux/rcupdate_wait.h>
-@@ -37,6 +38,7 @@ static int init_srcu_struct_fields(struct srcu_struct *ssp)
-       ssp->srcu_idx_max = 0;
-       INIT_WORK(&ssp->srcu_work, srcu_drive_gp);
-       INIT_LIST_HEAD(&ssp->srcu_work.entry);
-+      init_irq_work(&ssp->srcu_irq_work, srcu_tiny_irq_work);
-       return 0;
- }
-@@ -80,6 +82,7 @@ EXPORT_SYMBOL_GPL(init_srcu_struct);
- void cleanup_srcu_struct(struct srcu_struct *ssp)
- {
-       WARN_ON(ssp->srcu_lock_nesting[0] || ssp->srcu_lock_nesting[1]);
-+      irq_work_sync(&ssp->srcu_irq_work);
-       flush_work(&ssp->srcu_work);
-       WARN_ON(ssp->srcu_gp_running);
-       WARN_ON(ssp->srcu_gp_waiting);
-@@ -156,6 +159,20 @@ void srcu_drive_gp(struct work_struct *wp)
- }
- EXPORT_SYMBOL_GPL(srcu_drive_gp);
-+/*
-+ * Use an irq_work to defer schedule_work() to avoid acquiring the workqueue
-+ * pool->lock while the caller might hold scheduler locks, causing lockdep
-+ * splats due to workqueue_init() doing a wakeup.
-+ */
-+void srcu_tiny_irq_work(struct irq_work *irq_work)
-+{
-+      struct srcu_struct *ssp;
-+
-+      ssp = container_of(irq_work, struct srcu_struct, srcu_irq_work);
-+      schedule_work(&ssp->srcu_work);
-+}
-+EXPORT_SYMBOL_GPL(srcu_tiny_irq_work);
-+
- static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
- {
-       unsigned long cookie;
-@@ -166,7 +183,7 @@ static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
-       WRITE_ONCE(ssp->srcu_idx_max, cookie);
-       if (!READ_ONCE(ssp->srcu_gp_running)) {
-               if (likely(srcu_init_done))
--                      schedule_work(&ssp->srcu_work);
-+                      irq_work_queue(&ssp->srcu_irq_work);
-               else if (list_empty(&ssp->srcu_work.entry))
-                       list_add(&ssp->srcu_work.entry, &srcu_boot_list);
-       }
--- 
-2.53.0
-
index 6a061ed24320ed44dd33ceed56e0ce5e7b3af284..cbfd3859ae4ebd73bbf2c07b54470613a15963cd 100644 (file)
@@ -12,7 +12,6 @@ platform-x86-asus-nb-wmi-add-dmi-quirk-for-asus-rog-.patch
 btrfs-tracepoints-get-correct-superblock-from-dentry.patch
 alsa-hda-realtek-add-mute-led-quirk-for-hp-pavilion-.patch
 drm-amdgpu-handle-gpu-page-faults-correctly-on-non-4.patch
-srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
 netfilter-nft_set_pipapo_avx2-don-t-return-non-match.patch
 alsa-hda-realtek-add-quirk-for-framework-f111-000f.patch
 wifi-wl1251-validate-packet-ids-before-indexing-tx_f.patch
diff --git a/queue-6.12/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch b/queue-6.12/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
deleted file mode 100644 (file)
index 2be7d35..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-From a5f2a6e457ca8fe205976269d9d835b398a03f94 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 23 Mar 2026 20:14:18 -0400
-Subject: srcu: Use irq_work to start GP in tiny SRCU
-
-From: Joel Fernandes <joelagnelf@nvidia.com>
-
-[ Upstream commit a6fc88b22bc8d12ad52e8412c667ec0f5bf055af ]
-
-Tiny SRCU's srcu_gp_start_if_needed() directly calls schedule_work(),
-which acquires the workqueue pool->lock.
-
-This causes a lockdep splat when call_srcu() is called with a scheduler
-lock held, due to:
-
-  call_srcu() [holding pi_lock]
-    srcu_gp_start_if_needed()
-      schedule_work() -> pool->lock
-
-  workqueue_init() / create_worker() [holding pool->lock]
-    wake_up_process() -> try_to_wake_up() -> pi_lock
-
-Also add irq_work_sync() to cleanup_srcu_struct() to prevent a
-use-after-free if a queued irq_work fires after cleanup begins.
-
-Tested with rcutorture SRCU-T and no lockdep warnings.
-
-[ Thanks to Boqun for similar fix in patch "rcu: Use an intermediate irq_work
-to start process_srcu()" ]
-
-Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
-Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
-Signed-off-by: Boqun Feng <boqun@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- include/linux/srcutiny.h |  4 ++++
- kernel/rcu/srcutiny.c    | 19 ++++++++++++++++++-
- 2 files changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
-index 4d96bbdb45f08..6f39d3d8ef879 100644
---- a/include/linux/srcutiny.h
-+++ b/include/linux/srcutiny.h
-@@ -11,6 +11,7 @@
- #ifndef _LINUX_SRCU_TINY_H
- #define _LINUX_SRCU_TINY_H
-+#include <linux/irq_work_types.h>
- #include <linux/swait.h>
- struct srcu_struct {
-@@ -24,18 +25,21 @@ struct srcu_struct {
-       struct rcu_head *srcu_cb_head;  /* Pending callbacks: Head. */
-       struct rcu_head **srcu_cb_tail; /* Pending callbacks: Tail. */
-       struct work_struct srcu_work;   /* For driving grace periods. */
-+      struct irq_work srcu_irq_work;  /* Defer schedule_work() to irq work. */
- #ifdef CONFIG_DEBUG_LOCK_ALLOC
-       struct lockdep_map dep_map;
- #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
- };
- void srcu_drive_gp(struct work_struct *wp);
-+void srcu_tiny_irq_work(struct irq_work *irq_work);
- #define __SRCU_STRUCT_INIT(name, __ignored, ___ignored)                       \
- {                                                                     \
-       .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq),        \
-       .srcu_cb_tail = &name.srcu_cb_head,                             \
-       .srcu_work = __WORK_INITIALIZER(name.srcu_work, srcu_drive_gp), \
-+      .srcu_irq_work = { .func = srcu_tiny_irq_work },                \
-       __SRCU_DEP_MAP_INIT(name)                                       \
- }
-diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
-index 4dcbf8aa80ff7..ddea40b68e5f6 100644
---- a/kernel/rcu/srcutiny.c
-+++ b/kernel/rcu/srcutiny.c
-@@ -9,6 +9,7 @@
-  */
- #include <linux/export.h>
-+#include <linux/irq_work.h>
- #include <linux/mutex.h>
- #include <linux/preempt.h>
- #include <linux/rcupdate_wait.h>
-@@ -37,6 +38,7 @@ static int init_srcu_struct_fields(struct srcu_struct *ssp)
-       ssp->srcu_idx_max = 0;
-       INIT_WORK(&ssp->srcu_work, srcu_drive_gp);
-       INIT_LIST_HEAD(&ssp->srcu_work.entry);
-+      init_irq_work(&ssp->srcu_irq_work, srcu_tiny_irq_work);
-       return 0;
- }
-@@ -80,6 +82,7 @@ EXPORT_SYMBOL_GPL(init_srcu_struct);
- void cleanup_srcu_struct(struct srcu_struct *ssp)
- {
-       WARN_ON(ssp->srcu_lock_nesting[0] || ssp->srcu_lock_nesting[1]);
-+      irq_work_sync(&ssp->srcu_irq_work);
-       flush_work(&ssp->srcu_work);
-       WARN_ON(ssp->srcu_gp_running);
-       WARN_ON(ssp->srcu_gp_waiting);
-@@ -168,6 +171,20 @@ void srcu_drive_gp(struct work_struct *wp)
- }
- EXPORT_SYMBOL_GPL(srcu_drive_gp);
-+/*
-+ * Use an irq_work to defer schedule_work() to avoid acquiring the workqueue
-+ * pool->lock while the caller might hold scheduler locks, causing lockdep
-+ * splats due to workqueue_init() doing a wakeup.
-+ */
-+void srcu_tiny_irq_work(struct irq_work *irq_work)
-+{
-+      struct srcu_struct *ssp;
-+
-+      ssp = container_of(irq_work, struct srcu_struct, srcu_irq_work);
-+      schedule_work(&ssp->srcu_work);
-+}
-+EXPORT_SYMBOL_GPL(srcu_tiny_irq_work);
-+
- static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
- {
-       unsigned long cookie;
-@@ -181,7 +198,7 @@ static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
-       WRITE_ONCE(ssp->srcu_idx_max, cookie);
-       if (!READ_ONCE(ssp->srcu_gp_running)) {
-               if (likely(srcu_init_done))
--                      schedule_work(&ssp->srcu_work);
-+                      irq_work_queue(&ssp->srcu_irq_work);
-               else if (list_empty(&ssp->srcu_work.entry))
-                       list_add(&ssp->srcu_work.entry, &srcu_boot_list);
-       }
--- 
-2.53.0
-
index 8c501a4334901f89ac837e10e4aeec405a26a356..de1903a2b1292afb9c4386bb1beacf3784019e7e 100644 (file)
@@ -19,7 +19,6 @@ btrfs-tracepoints-get-correct-superblock-from-dentry.patch
 alsa-hda-realtek-add-mute-led-quirk-for-hp-pavilion-.patch
 netfilter-ctnetlink-ensure-safe-access-to-master-con.patch
 drm-amdgpu-handle-gpu-page-faults-correctly-on-non-4.patch
-srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
 alsa-hda-realtek-add-hp-laptop-15-fd0xxx-mute-led-qu.patch
 netfilter-nft_set_pipapo_avx2-don-t-return-non-match.patch
 alsa-hda-realtek-add-quirk-for-framework-f111-000f.patch
diff --git a/queue-6.18/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch b/queue-6.18/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
deleted file mode 100644 (file)
index e5ea288..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-From f68f47e5fae690168594593de043d7b16c8b235c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 23 Mar 2026 20:14:18 -0400
-Subject: srcu: Use irq_work to start GP in tiny SRCU
-
-From: Joel Fernandes <joelagnelf@nvidia.com>
-
-[ Upstream commit a6fc88b22bc8d12ad52e8412c667ec0f5bf055af ]
-
-Tiny SRCU's srcu_gp_start_if_needed() directly calls schedule_work(),
-which acquires the workqueue pool->lock.
-
-This causes a lockdep splat when call_srcu() is called with a scheduler
-lock held, due to:
-
-  call_srcu() [holding pi_lock]
-    srcu_gp_start_if_needed()
-      schedule_work() -> pool->lock
-
-  workqueue_init() / create_worker() [holding pool->lock]
-    wake_up_process() -> try_to_wake_up() -> pi_lock
-
-Also add irq_work_sync() to cleanup_srcu_struct() to prevent a
-use-after-free if a queued irq_work fires after cleanup begins.
-
-Tested with rcutorture SRCU-T and no lockdep warnings.
-
-[ Thanks to Boqun for similar fix in patch "rcu: Use an intermediate irq_work
-to start process_srcu()" ]
-
-Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
-Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
-Signed-off-by: Boqun Feng <boqun@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- include/linux/srcutiny.h |  4 ++++
- kernel/rcu/srcutiny.c    | 19 ++++++++++++++++++-
- 2 files changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
-index 51ce25f07930e..1f9a226e6fd81 100644
---- a/include/linux/srcutiny.h
-+++ b/include/linux/srcutiny.h
-@@ -11,6 +11,7 @@
- #ifndef _LINUX_SRCU_TINY_H
- #define _LINUX_SRCU_TINY_H
-+#include <linux/irq_work_types.h>
- #include <linux/swait.h>
- struct srcu_struct {
-@@ -24,18 +25,21 @@ struct srcu_struct {
-       struct rcu_head *srcu_cb_head;  /* Pending callbacks: Head. */
-       struct rcu_head **srcu_cb_tail; /* Pending callbacks: Tail. */
-       struct work_struct srcu_work;   /* For driving grace periods. */
-+      struct irq_work srcu_irq_work;  /* Defer schedule_work() to irq work. */
- #ifdef CONFIG_DEBUG_LOCK_ALLOC
-       struct lockdep_map dep_map;
- #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
- };
- void srcu_drive_gp(struct work_struct *wp);
-+void srcu_tiny_irq_work(struct irq_work *irq_work);
- #define __SRCU_STRUCT_INIT(name, __ignored, ___ignored)                       \
- {                                                                     \
-       .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq),        \
-       .srcu_cb_tail = &name.srcu_cb_head,                             \
-       .srcu_work = __WORK_INITIALIZER(name.srcu_work, srcu_drive_gp), \
-+      .srcu_irq_work = { .func = srcu_tiny_irq_work },                \
-       __SRCU_DEP_MAP_INIT(name)                                       \
- }
-diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
-index e3b64a5e0ec7e..d9c11d5f0ea45 100644
---- a/kernel/rcu/srcutiny.c
-+++ b/kernel/rcu/srcutiny.c
-@@ -9,6 +9,7 @@
-  */
- #include <linux/export.h>
-+#include <linux/irq_work.h>
- #include <linux/mutex.h>
- #include <linux/preempt.h>
- #include <linux/rcupdate_wait.h>
-@@ -41,6 +42,7 @@ static int init_srcu_struct_fields(struct srcu_struct *ssp)
-       ssp->srcu_idx_max = 0;
-       INIT_WORK(&ssp->srcu_work, srcu_drive_gp);
-       INIT_LIST_HEAD(&ssp->srcu_work.entry);
-+      init_irq_work(&ssp->srcu_irq_work, srcu_tiny_irq_work);
-       return 0;
- }
-@@ -84,6 +86,7 @@ EXPORT_SYMBOL_GPL(init_srcu_struct);
- void cleanup_srcu_struct(struct srcu_struct *ssp)
- {
-       WARN_ON(ssp->srcu_lock_nesting[0] || ssp->srcu_lock_nesting[1]);
-+      irq_work_sync(&ssp->srcu_irq_work);
-       flush_work(&ssp->srcu_work);
-       WARN_ON(ssp->srcu_gp_running);
-       WARN_ON(ssp->srcu_gp_waiting);
-@@ -172,6 +175,20 @@ void srcu_drive_gp(struct work_struct *wp)
- }
- EXPORT_SYMBOL_GPL(srcu_drive_gp);
-+/*
-+ * Use an irq_work to defer schedule_work() to avoid acquiring the workqueue
-+ * pool->lock while the caller might hold scheduler locks, causing lockdep
-+ * splats due to workqueue_init() doing a wakeup.
-+ */
-+void srcu_tiny_irq_work(struct irq_work *irq_work)
-+{
-+      struct srcu_struct *ssp;
-+
-+      ssp = container_of(irq_work, struct srcu_struct, srcu_irq_work);
-+      schedule_work(&ssp->srcu_work);
-+}
-+EXPORT_SYMBOL_GPL(srcu_tiny_irq_work);
-+
- static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
- {
-       unsigned long cookie;
-@@ -184,7 +201,7 @@ static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
-       WRITE_ONCE(ssp->srcu_idx_max, cookie);
-       if (!READ_ONCE(ssp->srcu_gp_running)) {
-               if (likely(srcu_init_done))
--                      schedule_work(&ssp->srcu_work);
-+                      irq_work_queue(&ssp->srcu_irq_work);
-               else if (list_empty(&ssp->srcu_work.entry))
-                       list_add(&ssp->srcu_work.entry, &srcu_boot_list);
-       }
--- 
-2.53.0
-
index f87ce12f70e15700cb3558a86d043c150b9e039b..d7660f72a4499071fd06192b3781bdcb821aa55f 100644 (file)
@@ -9,7 +9,6 @@ asoc-sof-topology-reject-invalid-vendor-array-size-i.patch
 can-mcp251x-add-error-handling-for-power-enable-in-o.patch
 btrfs-tracepoints-get-correct-superblock-from-dentry.patch
 alsa-hda-realtek-add-mute-led-quirk-for-hp-pavilion-.patch
-srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
 netfilter-nft_set_pipapo_avx2-don-t-return-non-match.patch
 alsa-hda-realtek-add-quirk-for-framework-f111-000f.patch
 wifi-wl1251-validate-packet-ids-before-indexing-tx_f.patch
diff --git a/queue-6.6/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch b/queue-6.6/srcu-use-irq_work-to-start-gp-in-tiny-srcu.patch
deleted file mode 100644 (file)
index 33a2e84..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-From 0f6bb6e1c79ff359ace8bc2b5ab20a92133cbd6c Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 23 Mar 2026 20:14:18 -0400
-Subject: srcu: Use irq_work to start GP in tiny SRCU
-
-From: Joel Fernandes <joelagnelf@nvidia.com>
-
-[ Upstream commit a6fc88b22bc8d12ad52e8412c667ec0f5bf055af ]
-
-Tiny SRCU's srcu_gp_start_if_needed() directly calls schedule_work(),
-which acquires the workqueue pool->lock.
-
-This causes a lockdep splat when call_srcu() is called with a scheduler
-lock held, due to:
-
-  call_srcu() [holding pi_lock]
-    srcu_gp_start_if_needed()
-      schedule_work() -> pool->lock
-
-  workqueue_init() / create_worker() [holding pool->lock]
-    wake_up_process() -> try_to_wake_up() -> pi_lock
-
-Also add irq_work_sync() to cleanup_srcu_struct() to prevent a
-use-after-free if a queued irq_work fires after cleanup begins.
-
-Tested with rcutorture SRCU-T and no lockdep warnings.
-
-[ Thanks to Boqun for similar fix in patch "rcu: Use an intermediate irq_work
-to start process_srcu()" ]
-
-Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
-Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
-Signed-off-by: Boqun Feng <boqun@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- include/linux/srcutiny.h |  4 ++++
- kernel/rcu/srcutiny.c    | 19 ++++++++++++++++++-
- 2 files changed, 22 insertions(+), 1 deletion(-)
-
-diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
-index 447133171d95f..bad5fd0f1ddb6 100644
---- a/include/linux/srcutiny.h
-+++ b/include/linux/srcutiny.h
-@@ -11,6 +11,7 @@
- #ifndef _LINUX_SRCU_TINY_H
- #define _LINUX_SRCU_TINY_H
-+#include <linux/irq_work_types.h>
- #include <linux/swait.h>
- struct srcu_struct {
-@@ -24,18 +25,21 @@ struct srcu_struct {
-       struct rcu_head *srcu_cb_head;  /* Pending callbacks: Head. */
-       struct rcu_head **srcu_cb_tail; /* Pending callbacks: Tail. */
-       struct work_struct srcu_work;   /* For driving grace periods. */
-+      struct irq_work srcu_irq_work;  /* Defer schedule_work() to irq work. */
- #ifdef CONFIG_DEBUG_LOCK_ALLOC
-       struct lockdep_map dep_map;
- #endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
- };
- void srcu_drive_gp(struct work_struct *wp);
-+void srcu_tiny_irq_work(struct irq_work *irq_work);
- #define __SRCU_STRUCT_INIT(name, __ignored, ___ignored)                       \
- {                                                                     \
-       .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq),        \
-       .srcu_cb_tail = &name.srcu_cb_head,                             \
-       .srcu_work = __WORK_INITIALIZER(name.srcu_work, srcu_drive_gp), \
-+      .srcu_irq_work = { .func = srcu_tiny_irq_work },                \
-       __SRCU_DEP_MAP_INIT(name)                                       \
- }
-diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c
-index c38e5933a5d69..24aa302b3269a 100644
---- a/kernel/rcu/srcutiny.c
-+++ b/kernel/rcu/srcutiny.c
-@@ -9,6 +9,7 @@
-  */
- #include <linux/export.h>
-+#include <linux/irq_work.h>
- #include <linux/mutex.h>
- #include <linux/preempt.h>
- #include <linux/rcupdate_wait.h>
-@@ -37,6 +38,7 @@ static int init_srcu_struct_fields(struct srcu_struct *ssp)
-       ssp->srcu_idx_max = 0;
-       INIT_WORK(&ssp->srcu_work, srcu_drive_gp);
-       INIT_LIST_HEAD(&ssp->srcu_work.entry);
-+      init_irq_work(&ssp->srcu_irq_work, srcu_tiny_irq_work);
-       return 0;
- }
-@@ -80,6 +82,7 @@ EXPORT_SYMBOL_GPL(init_srcu_struct);
- void cleanup_srcu_struct(struct srcu_struct *ssp)
- {
-       WARN_ON(ssp->srcu_lock_nesting[0] || ssp->srcu_lock_nesting[1]);
-+      irq_work_sync(&ssp->srcu_irq_work);
-       flush_work(&ssp->srcu_work);
-       WARN_ON(ssp->srcu_gp_running);
-       WARN_ON(ssp->srcu_gp_waiting);
-@@ -156,6 +159,20 @@ void srcu_drive_gp(struct work_struct *wp)
- }
- EXPORT_SYMBOL_GPL(srcu_drive_gp);
-+/*
-+ * Use an irq_work to defer schedule_work() to avoid acquiring the workqueue
-+ * pool->lock while the caller might hold scheduler locks, causing lockdep
-+ * splats due to workqueue_init() doing a wakeup.
-+ */
-+void srcu_tiny_irq_work(struct irq_work *irq_work)
-+{
-+      struct srcu_struct *ssp;
-+
-+      ssp = container_of(irq_work, struct srcu_struct, srcu_irq_work);
-+      schedule_work(&ssp->srcu_work);
-+}
-+EXPORT_SYMBOL_GPL(srcu_tiny_irq_work);
-+
- static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
- {
-       unsigned long cookie;
-@@ -166,7 +183,7 @@ static void srcu_gp_start_if_needed(struct srcu_struct *ssp)
-       WRITE_ONCE(ssp->srcu_idx_max, cookie);
-       if (!READ_ONCE(ssp->srcu_gp_running)) {
-               if (likely(srcu_init_done))
--                      schedule_work(&ssp->srcu_work);
-+                      irq_work_queue(&ssp->srcu_irq_work);
-               else if (list_empty(&ssp->srcu_work.entry))
-                       list_add(&ssp->srcu_work.entry, &srcu_boot_list);
-       }
--- 
-2.53.0
-