Commit 9fb45707 authored by Tejun Heo's avatar Tejun Heo
Browse files

sched_ext: Track @p's rq lock across set_cpus_allowed_scx -> ops.set_cpumask



The SCX_CALL_OP_TASK call site passes rq=NULL incorrectly, leaving
scx_locked_rq() unset. Pass task_rq(p) instead so update_locked_rq()
reflects reality.

v2: Add Fixes: tag (Andrea Righi).

Fixes: 18853ba7 ("sched_ext: Track currently locked rq")
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reviewed-by: default avatarAndrea Righi <arighi@nvidia.com>
parent a37e1343
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3360,7 +3360,7 @@ static void set_cpus_allowed_scx(struct task_struct *p,
	 * designation pointless. Cast it away when calling the operation.
	 */
	if (SCX_HAS_OP(sch, set_cpumask))
		SCX_CALL_OP_TASK(sch, SCX_KF_REST, set_cpumask, NULL,
		SCX_CALL_OP_TASK(sch, SCX_KF_REST, set_cpumask, task_rq(p),
				 p, (struct cpumask *)p->cpus_ptr);
}