[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zy7DWssEuFN6Zehi@slm.duckdns.org>
Date: Fri, 8 Nov 2024 16:05:14 -1000
From: Tejun Heo <tj@...nel.org>
To: Changwoo Min <multics69@...il.com>
Cc: arighi@...dia.com, void@...ifault.com, changwoo@...lia.com,
kernel-dev@...lia.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched_ext: add a missing rcu_read_lock/unlock pair at
scx_select_cpu_dfl()
Hello,
On Sat, Nov 09, 2024 at 10:54:20AM +0900, Changwoo Min wrote:
...
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 6ff501a18b88..830a21d666e9 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -3320,9 +3320,11 @@ static s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu,
> if (static_branch_maybe(CONFIG_SCHED_MC, &scx_selcpu_topo_llc)) {
> struct sched_domain *sd;
>
> + rcu_read_lock();
> sd = rcu_dereference(per_cpu(sd_llc, prev_cpu));
> if (sd)
> llc_cpus = sched_domain_span(sd);
> + rcu_read_unlock();
Shouldn't RCU critical section cover the places where llc_cpus is deref'd?
Thanks.
--
tejun
Powered by blists - more mailing lists