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: 956f2b11a8 ("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>
This commit is contained in:
Andrea Righi 2025-10-29 14:08:43 +01:00 committed by Tejun Heo
parent a3c4a0a42e
commit f4fa7c25f6
1 changed files with 1 additions and 1 deletions

View File

@ -6401,7 +6401,7 @@ __bpf_kfunc void scx_bpf_cpuperf_set(s32 cpu, u32 perf)
guard(rcu)(); guard(rcu)();
sch = rcu_dereference(sch); sch = rcu_dereference(scx_root);
if (unlikely(!sch)) if (unlikely(!sch))
return; return;