Skip to content

Commit ec01033

Browse files
committed
sched_ext: scx_cgroup_exit() may be called without successful scx_cgroup_init()
568894e ("sched_ext: Add scx_cgroup_enabled to gate cgroup operations and fix scx_tg_online()") assumed that scx_cgroup_exit() is only called after scx_cgroup_init() finished successfully. This isn't true. scx_cgroup_exit() can be called without scx_cgroup_init() being called at all or after scx_cgroup_init() failed in the middle. As init state is tracked per cgroup, scx_cgroup_exit() can be used safely to clean up in all cases. Remove the incorrect WARN_ON_ONCE(). Signed-off-by: Tejun Heo <[email protected]> Fixes: 568894e ("sched_ext: Add scx_cgroup_enabled to gate cgroup operations and fix scx_tg_online()")
1 parent cc9877f commit ec01033

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/sched/ext.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4052,7 +4052,6 @@ static void scx_cgroup_exit(void)
40524052

40534053
percpu_rwsem_assert_held(&scx_cgroup_rwsem);
40544054

4055-
WARN_ON_ONCE(!scx_cgroup_enabled);
40564055
scx_cgroup_enabled = false;
40574056

40584057
/*

0 commit comments

Comments
 (0)