lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ece27d2-0948-4d28-84b8-063bddc3e38f@arm.com>
Date: Wed, 29 Oct 2025 13:37:42 +0000
From: Christian Loehle <christian.loehle@....com>
To: Andrea Righi <arighi@...dia.com>, Tejun Heo <tj@...nel.org>,
 David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>
Cc: sched-ext@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: Fix use of uninitialized variable in
 scx_bpf_cpuperf_set()

On 10/29/25 13:08, Andrea Righi wrote:
> 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@...dia.com>
> ---
>  kernel/sched/ext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index ecb251e883eab..1a019a7728fb2 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;
>  

Reviewed-by: Christian Loehle <christian.loehle@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ