]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched_ext: Track @p's rq lock across set_cpus_allowed_scx -> ops.set_cpumask
authorTejun Heo <tj@kernel.org>
Fri, 10 Apr 2026 17:54:06 +0000 (07:54 -1000)
committerTejun Heo <tj@kernel.org>
Fri, 10 Apr 2026 17:54:06 +0000 (07:54 -1000)
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: 18853ba782be ("sched_ext: Track currently locked rq")
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
kernel/sched/ext.c

index 11a8f936ecc14108d43d827d78fd4f9e7efd161e..aee48b34aefad7658e850ce79b65779a9cf4df32 100644 (file)
@@ -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);
 }