Re: [PATCH v8 1/6] sched: Annotate rq->rd with __rcu and update lockless readers
From: Aaron Tomlin
Date: Thu Aug 27 2026 - 16:38:06 EST
On Thu, Aug 27, 2026 at 03:40:09PM -0400, Aaron Tomlin wrote:
> @@ -3355,10 +3363,7 @@ static void set_cpus_allowed_dl(struct task_struct *p,
> bool dl_task_needs_bw_move(struct task_struct *p,
> const struct cpumask *new_mask)
> {
> - if (!dl_task(p))
> - return false;
> -
> - return !cpumask_intersects(task_rq(p)->rd->span, new_mask);
> + return !cpumask_intersects(rcu_dereference_root_domain(task_rq(p)->rd)->span, new_mask);
> }
Hi Peter, Vincent,
Please ignore; I will address this in the next iteration.
Sashiko [1] correctly reported that dl_task_needs_bw_move(), is invoked
while holding cpuset_mutex in process context, with neither
sched_domains_mutex held nor an active RCU read-side critical section.
I subsequently confirmed this using virtme-ng:
[ 170.335047] WARNING: suspicious RCU usage
[ 170.335052] 7.2.0-rc7-virtme-00041-g6509e33120f4 #23 Not tainted
[ 170.335054] -----------------------------
[ 170.335056] kernel/sched/deadline.c:3366 suspicious rcu_dereference_check() usage!
[1]: https://sashiko.dev/#/patchset/20260827194014.977758-1-atomlin%40atomlin.com
Additionally, direct dereferences of the __rcu pointer still require
suitable conversion.
Kind regards,
--
Aaron Tomlin