Skip to content

Commit b60a90b

Browse files
htejungregkh
authored andcommitted
sched_ext: Track @p's rq lock across set_cpus_allowed_scx -> ops.set_cpumask
[ Upstream commit 9fb4570 ] 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: 18853ba ("sched_ext: Track currently locked rq") Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9769c14 commit b60a90b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/sched/ext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2606,7 +2606,7 @@ static void set_cpus_allowed_scx(struct task_struct *p,
26062606
* designation pointless. Cast it away when calling the operation.
26072607
*/
26082608
if (SCX_HAS_OP(sch, set_cpumask))
2609-
SCX_CALL_OP_TASK(sch, SCX_KF_REST, set_cpumask, NULL,
2609+
SCX_CALL_OP_TASK(sch, SCX_KF_REST, set_cpumask, task_rq(p),
26102610
p, (struct cpumask *)p->cpus_ptr);
26112611
}
26122612

0 commit comments

Comments
 (0)