mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHSET sched_ext/for-7.2-fixes] sched_ext: Assorted sub-scheduler and cgroup fixes
@ 2026-07-16 21:30 Tejun Heo
  2026-07-16 21:30 ` [PATCH 1/4] sched_ext: Reject setting disallow from init_task outside the enable path Tejun Heo
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Tejun Heo @ 2026-07-16 21:30 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min
  Cc: sched-ext, Emil Tsalapatis, linux-kernel, Tejun Heo

This patchset contains three sub-scheduler fixes and a cgroup lock
ordering deadlock fix.

 0001-sched_ext-Reject-setting-disallow-from-init_task-out.patch
 0002-sched_ext-Take-cgroup_lock-first-in-scx_cgroup_lock.patch
 0003-sched_ext-Skip-sub-disable-teardown-for-never-linked.patch
 0004-sched_ext-Don-t-enable-non-ext-tasks-in-the-sub-sche.patch

- 0001 makes ops.init_task() setting p->scx.disallow outside the enable
  path fail the scheduler. The sub-scheduler disable path could reach the
  load-path-only policy revert and silently rewrite a live task's policy.

- 0002 fixes a three-way deadlock among scx_cgroup_lock(), cgroup teardown
  draining the cpu controller's files, and a concurrent cpu.weight write.
  Present in released kernels since v6.18 and marked for stable.

- 0003 fixes a use-after-free when a sub-scheduler whose enable failed
  before linking is torn down concurrently with root disable.

- 0004 gates task enabling on the ext class in the sub-scheduler task
  loops. A non-ext task under an SCX_OPS_SWITCH_PARTIAL root could be
  marked ENABLED while staying on its own class, corrupting the task state
  machine.

This is against sched_ext/for-7.2-fixes (0e2f4ab68a89) and also available
in the following git branch:

 https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-sub-cgroup-fixes

diffstat follows.

 include/linux/sched/ext.h | 10 +++++-----
 kernel/sched/ext/ext.c    | 47 ++++++++++++++++++++++++++++++++++++++---------
 2 files changed, 43 insertions(+), 14 deletions(-)

--
tejun

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-18  5:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-16 21:30 [PATCHSET sched_ext/for-7.2-fixes] sched_ext: Assorted sub-scheduler and cgroup fixes Tejun Heo
2026-07-16 21:30 ` [PATCH 1/4] sched_ext: Reject setting disallow from init_task outside the enable path Tejun Heo
2026-07-16 21:30 ` [PATCH 2/4] sched_ext: Take cgroup_lock() first in scx_cgroup_lock() Tejun Heo
2026-07-16 21:30 ` [PATCH 3/4] sched_ext: Skip sub-disable teardown for never-linked sub-schedulers Tejun Heo
2026-07-16 21:30 ` [PATCH 4/4] sched_ext: Don't enable non-ext tasks in the sub-sched task loops Tejun Heo
2026-07-17  9:11 ` [PATCHSET sched_ext/for-7.2-fixes] sched_ext: Assorted sub-scheduler and cgroup fixes Andrea Righi
2026-07-18  4:12   ` Tejun Heo
2026-07-18  5:34     ` Andrea Righi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox