Commit f4fa7c25 authored by Andrea Righi's avatar Andrea Righi Committed by Tejun Heo
Browse files

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: 956f2b11 ("sched_ext: Drop kf_cpu_valid()")
Signed-off-by: default avatarAndrea Righi <arighi@nvidia.com>
Reviewed-by: default avatarChristian Loehle <christian.loehle@arm.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent a3c4a0a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;