]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
sched_ext: Fix sub_detach op check to test the parent's ops
authorTejun Heo <tj@kernel.org>
Tue, 10 Mar 2026 17:12:21 +0000 (07:12 -1000)
committerTejun Heo <tj@kernel.org>
Tue, 10 Mar 2026 17:12:21 +0000 (07:12 -1000)
sub_detach is the parent's op called to notify the parent that a child
is detaching. Test parent->ops.sub_detach instead of sch->ops.sub_detach.

Fixes: ebeca1f930ea ("sched_ext: Introduce cgroup sub-sched support")
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
kernel/sched/ext.c

index 93a230859dd7cc7b66a4400aee8fc4ddbe5c6254..4fa0be4980d4fbcc4b713d86113494680f256fd4 100644 (file)
@@ -5438,7 +5438,7 @@ static void scx_sub_disable(struct scx_sched *sch)
         */
        wake_up_all(&scx_unlink_waitq);
 
-       if (sch->ops.sub_detach && sch->sub_attached) {
+       if (parent->ops.sub_detach && sch->sub_attached) {
                struct scx_sub_detach_args sub_detach_args = {
                        .ops = &sch->ops,
                        .cgroup_path = sch->cgrp_path,