From 7e92cf4354e9803cc7b8ed01f38371e0e89d2a0a Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 10 Mar 2026 07:12:21 -1000 Subject: [PATCH] sched_ext: Fix sub_detach op check to test the parent's ops 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 Reviewed-by: Andrea Righi --- kernel/sched/ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 93a230859dd7..4fa0be4980d4 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -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,