From: Tejun Heo Date: Tue, 10 Mar 2026 17:12:21 +0000 (-1000) Subject: sched_ext: Fix sub_detach op check to test the parent's ops X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e92cf4354e9803cc7b8ed01f38371e0e89d2a0a;p=thirdparty%2Flinux.git 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 --- diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 93a230859dd7c..4fa0be4980d4f 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,