Skip to content

Commit f4fa7c2

Browse files
arighihtejun
authored andcommitted
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: 956f2b1 ("sched_ext: Drop kf_cpu_valid()") Signed-off-by: Andrea Righi <[email protected]> Reviewed-by: Christian Loehle <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent a3c4a0a commit f4fa7c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6401,7 +6401,7 @@ __bpf_kfunc void scx_bpf_cpuperf_set(s32 cpu, u32 perf)
64016401

64026402
guard(rcu)();
64036403

6404-
sch = rcu_dereference(sch);
6404+
sch = rcu_dereference(scx_root);
64056405
if (unlikely(!sch))
64066406
return;
64076407

0 commit comments

Comments
 (0)