mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Changwoo Min <multics69@gmail.com>
Cc: arighi@nvidia.com, void@manifault.com, changwoo@igalia.com,
	kernel-dev@igalia.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched_ext: add a missing rcu_read_lock/unlock pair at scx_select_cpu_dfl()
Date: Fri, 8 Nov 2024 16:05:14 -1000	[thread overview]
Message-ID: <Zy7DWssEuFN6Zehi@slm.duckdns.org> (raw)
In-Reply-To: <20241109015420.170729-1-changwoo@igalia.com>

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

  reply	other threads:[~2024-11-09  2:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-09  1:54 Changwoo Min
2024-11-09  2:05 ` Tejun Heo [this message]
2024-11-09  2:32   ` Changwoo Min

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zy7DWssEuFN6Zehi@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=multics69@gmail.com \
    --cc=void@manifault.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®