diff options
| author | Andrea Righi <arighi@nvidia.com> | 2025-10-29 14:08:43 +0100 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-10-29 05:14:39 -1000 |
| commit | f4fa7c25f632cd925352b4d46f245653a23b1d1a (patch) | |
| tree | 8e6afdba9b1013fa605125322890c83ffb1f9684 /kernel/sched/ext.c | |
| parent | a3c4a0a42e61aad1056a3d33fd603c1ae66d4288 (diff) | |
sched_ext: Fix use of uninitialized variable in scx_bpf_cpuperf_set()
scx_bpf_cpuperf_set() has a typo where it dereferences the local
variable @sch, instead of the global @scx_root pointer. Fix by
dereferencing the correct variable.
Fixes: 956f2b11a8a4f ("sched_ext: Drop kf_cpu_valid()")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/sched/ext.c')
| -rw-r--r-- | kernel/sched/ext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index ecb251e883ea..1a019a7728fb 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -6401,7 +6401,7 @@ __bpf_kfunc void scx_bpf_cpuperf_set(s32 cpu, u32 perf) guard(rcu)(); - sch = rcu_dereference(sch); + sch = rcu_dereference(scx_root); if (unlikely(!sch)) return; |