[PATCH 1/5] sched_ext: Fix sub_detach op check to test the parent's ops
From: Tejun Heo
Date: Mon Mar 09 2026 - 21:17:11 EST
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@xxxxxxxxxx>
---
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 07476355bfd5..8bf4b51ad0e5 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,
--
2.53.0