]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop sched patch from 6.12 and 6.14
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 May 2025 08:52:47 +0000 (10:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 May 2025 08:52:47 +0000 (10:52 +0200)
queue-6.12/sched_ext-fix-missing-rq-lock-in-scx_bpf_cpuperf_set.patch [deleted file]
queue-6.12/series
queue-6.14/sched_ext-fix-missing-rq-lock-in-scx_bpf_cpuperf_set.patch [deleted file]
queue-6.14/series

diff --git a/queue-6.12/sched_ext-fix-missing-rq-lock-in-scx_bpf_cpuperf_set.patch b/queue-6.12/sched_ext-fix-missing-rq-lock-in-scx_bpf_cpuperf_set.patch
deleted file mode 100644 (file)
index 4e199df..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-From b19ccb5dc4d3d35b83b94fe2514456dc0b3a9ba5 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 22 Apr 2025 10:26:33 +0200
-Subject: sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()
-
-From: Andrea Righi <arighi@nvidia.com>
-
-[ Upstream commit a11d6784d7316a6c77ca9f14fb1a698ebbb3c1fb ]
-
-scx_bpf_cpuperf_set() can be used to set a performance target level on
-any CPU. However, it doesn't correctly acquire the corresponding rq
-lock, which may lead to unsafe behavior and trigger the following
-warning, due to the lockdep_assert_rq_held() check:
-
-[   51.713737] WARNING: CPU: 3 PID: 3899 at kernel/sched/sched.h:1512 scx_bpf_cpuperf_set+0x1a0/0x1e0
-...
-[   51.713836] Call trace:
-[   51.713837]  scx_bpf_cpuperf_set+0x1a0/0x1e0 (P)
-[   51.713839]  bpf_prog_62d35beb9301601f_bpfland_init+0x168/0x440
-[   51.713841]  bpf__sched_ext_ops_init+0x54/0x8c
-[   51.713843]  scx_ops_enable.constprop.0+0x2c0/0x10f0
-[   51.713845]  bpf_scx_reg+0x18/0x30
-[   51.713847]  bpf_struct_ops_link_create+0x154/0x1b0
-[   51.713849]  __sys_bpf+0x1934/0x22a0
-
-Fix by properly acquiring the rq lock when possible or raising an error
-if we try to operate on a CPU that is not the one currently locked.
-
-Fixes: d86adb4fc0655 ("sched_ext: Add cpuperf support")
-Signed-off-by: Andrea Righi <arighi@nvidia.com>
-Acked-by: Changwoo Min <changwoo@igalia.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- kernel/sched/ext.c | 27 +++++++++++++++++++++++----
- 1 file changed, 23 insertions(+), 4 deletions(-)
-
-diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
-index 7ed25654820fd..0147c4452f4df 100644
---- a/kernel/sched/ext.c
-+++ b/kernel/sched/ext.c
-@@ -7018,13 +7018,32 @@ __bpf_kfunc void scx_bpf_cpuperf_set(s32 cpu, u32 perf)
-       }
-       if (ops_cpu_valid(cpu, NULL)) {
--              struct rq *rq = cpu_rq(cpu);
-+              struct rq *rq = cpu_rq(cpu), *locked_rq = scx_locked_rq();
-+              struct rq_flags rf;
-+
-+              /*
-+               * When called with an rq lock held, restrict the operation
-+               * to the corresponding CPU to prevent ABBA deadlocks.
-+               */
-+              if (locked_rq && rq != locked_rq) {
-+                      scx_ops_error("Invalid target CPU %d", cpu);
-+                      return;
-+              }
-+
-+              /*
-+               * If no rq lock is held, allow to operate on any CPU by
-+               * acquiring the corresponding rq lock.
-+               */
-+              if (!locked_rq) {
-+                      rq_lock_irqsave(rq, &rf);
-+                      update_rq_clock(rq);
-+              }
-               rq->scx.cpuperf_target = perf;
-+              cpufreq_update_util(rq, 0);
--              rcu_read_lock_sched_notrace();
--              cpufreq_update_util(cpu_rq(cpu), 0);
--              rcu_read_unlock_sched_notrace();
-+              if (!locked_rq)
-+                      rq_unlock_irqrestore(rq, &rf);
-       }
- }
--- 
-2.39.5
-
index 962dc1e26fd5a7d6ee2b47d63edcf126de6ae893..44aab8a67d24102a991f3b7cc06642fb84744509 100644 (file)
@@ -1,4 +1,3 @@
-sched_ext-fix-missing-rq-lock-in-scx_bpf_cpuperf_set.patch
 arm64-dts-rockchip-assign-rt5616-mclk-rate-on-rk3588.patch
 fs-xattr.c-fix-simple_xattr_list-to-always-include-s.patch
 drivers-platform-x86-amd-pmf-check-for-invalid-sidel.patch
diff --git a/queue-6.14/sched_ext-fix-missing-rq-lock-in-scx_bpf_cpuperf_set.patch b/queue-6.14/sched_ext-fix-missing-rq-lock-in-scx_bpf_cpuperf_set.patch
deleted file mode 100644 (file)
index 6c10bd2..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-From e0dd90f92931fd4040aee0bf75b348a402464821 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Tue, 22 Apr 2025 10:26:33 +0200
-Subject: sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()
-
-From: Andrea Righi <arighi@nvidia.com>
-
-[ Upstream commit a11d6784d7316a6c77ca9f14fb1a698ebbb3c1fb ]
-
-scx_bpf_cpuperf_set() can be used to set a performance target level on
-any CPU. However, it doesn't correctly acquire the corresponding rq
-lock, which may lead to unsafe behavior and trigger the following
-warning, due to the lockdep_assert_rq_held() check:
-
-[   51.713737] WARNING: CPU: 3 PID: 3899 at kernel/sched/sched.h:1512 scx_bpf_cpuperf_set+0x1a0/0x1e0
-...
-[   51.713836] Call trace:
-[   51.713837]  scx_bpf_cpuperf_set+0x1a0/0x1e0 (P)
-[   51.713839]  bpf_prog_62d35beb9301601f_bpfland_init+0x168/0x440
-[   51.713841]  bpf__sched_ext_ops_init+0x54/0x8c
-[   51.713843]  scx_ops_enable.constprop.0+0x2c0/0x10f0
-[   51.713845]  bpf_scx_reg+0x18/0x30
-[   51.713847]  bpf_struct_ops_link_create+0x154/0x1b0
-[   51.713849]  __sys_bpf+0x1934/0x22a0
-
-Fix by properly acquiring the rq lock when possible or raising an error
-if we try to operate on a CPU that is not the one currently locked.
-
-Fixes: d86adb4fc0655 ("sched_ext: Add cpuperf support")
-Signed-off-by: Andrea Righi <arighi@nvidia.com>
-Acked-by: Changwoo Min <changwoo@igalia.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- kernel/sched/ext.c | 27 +++++++++++++++++++++++----
- 1 file changed, 23 insertions(+), 4 deletions(-)
-
-diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
-index 77cdff0d9f348..0067f540a3f0f 100644
---- a/kernel/sched/ext.c
-+++ b/kernel/sched/ext.c
-@@ -7459,13 +7459,32 @@ __bpf_kfunc void scx_bpf_cpuperf_set(s32 cpu, u32 perf)
-       }
-       if (ops_cpu_valid(cpu, NULL)) {
--              struct rq *rq = cpu_rq(cpu);
-+              struct rq *rq = cpu_rq(cpu), *locked_rq = scx_locked_rq();
-+              struct rq_flags rf;
-+
-+              /*
-+               * When called with an rq lock held, restrict the operation
-+               * to the corresponding CPU to prevent ABBA deadlocks.
-+               */
-+              if (locked_rq && rq != locked_rq) {
-+                      scx_ops_error("Invalid target CPU %d", cpu);
-+                      return;
-+              }
-+
-+              /*
-+               * If no rq lock is held, allow to operate on any CPU by
-+               * acquiring the corresponding rq lock.
-+               */
-+              if (!locked_rq) {
-+                      rq_lock_irqsave(rq, &rf);
-+                      update_rq_clock(rq);
-+              }
-               rq->scx.cpuperf_target = perf;
-+              cpufreq_update_util(rq, 0);
--              rcu_read_lock_sched_notrace();
--              cpufreq_update_util(cpu_rq(cpu), 0);
--              rcu_read_unlock_sched_notrace();
-+              if (!locked_rq)
-+                      rq_unlock_irqrestore(rq, &rf);
-       }
- }
--- 
-2.39.5
-
index d2e1293ac8f0349e0623454fc2a4126aa4e2dbaf..6407f68f42963711bd8c2389474eb6a2474ba6cc 100644 (file)
@@ -1,4 +1,3 @@
-sched_ext-fix-missing-rq-lock-in-scx_bpf_cpuperf_set.patch
 arm64-dts-rockchip-assign-rt5616-mclk-rate-on-rk3588.patch
 fs-xattr.c-fix-simple_xattr_list-to-always-include-s.patch
 drivers-platform-x86-amd-pmf-check-for-invalid-sidel.patch