Re: [PATCH v2] sched_ext: add a missing rcu_read_lock/unlock pair at scx_select_cpu_dfl()
From: Tejun Heo
Date: Sat Nov 09 2024 - 10:48:12 EST
On Sat, Nov 09, 2024 at 03:29:05PM +0900, Changwoo Min wrote:
> When getting an LLC CPU mask in the default CPU selection policy,
> scx_select_cpu_dfl(), a pointer to the sched_domain is dereferenced
> using rcu_read_lock() without holding rcu_read_lock(). Such an unprotected
> dereference often causes the following warning and can cause an invalid
> memory access in the worst case.
>
> Therefore, protect dereference of a sched_domain pointer using a pair
> of rcu_read_lock() and unlock().
...
> Signed-off-by: Changwoo Min <changwoo@xxxxxxxxxx>
Applied to sched_ext/for-6.13.
Thanks.
--
tejun