[GIT PULL] sched_ext: Fixes for v7.4-rc5
From: Tejun Heo
Date: Fri Dec 04 2026 - 12:11:56 EST
Hello,
The following changes since commit 97e1c7d467d07734f8f5c8c64730e1f7c415bd46:
sched_ext: Attach fair_server before tasks fall back to fair on disable (2026-11-24 22:48:52 -1000)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git tags/sched_ext-for-7.4-rc5-fixes
for you to fetch changes up to 82cd5232be43ff25236c47d7c9126b3f0777359d:
sched_ext: Reset task fields after ops.exit_task() (2026-12-04 07:00:38 -1000)
----------------------------------------------------------------
sched_ext: Fixes for v7.4-rc5
- The kfuncs that print messages for BPF schedulers read the format string
with no length limit and could see it change between validation and use.
- An exiting task could keep pointing at a scheduler that was later freed.
- A task dispatched to a shared queue could be taken off it by another CPU
before the dispatch finished and then never run again.
- With core scheduling, a sub-scheduler's task could run on a CPU that the
sub-scheduler isn't allowed to use.
- Smaller fixes: kfuncs that depend on the caller's locking context are now
rejected from the sub-scheduler capability callback, and a task's exit
callback could leave stale scheduling state for its next scheduler.
----------------------------------------------------------------
Andrea Righi (1):
sched_ext: Fix unbounded format string reads in the bstr kfuncs
Changwoo Min (1):
sched_ext: Reset task fields after ops.exit_task()
Chris Mason (1):
sched_ext: Don't skip NONE tasks in sched_ext_dead()
Kuba Piecuch (8):
sched_ext: Factor out release_dispatching_and_lock_task_rq()
sched_ext: Fix ops_state and ops.dequeue() locking races in dispatch
sched_ext: Remove scx_wait_dispatching()
selftests/sched_ext: Test that ops.dequeue() runs with the task's rq locked
sched_ext: Enforce SCX_CAP_BASE in core-sched task selection
selftests/sched_ext: Add sub_core_caps test for core-sched SCX_CAP_BASE
sched_ext: Reject rq-lock-sensitive kfuncs from ops.sub_caps_updated()
selftests/sched_ext: Add sub_caps_kfunc test
kernel/sched/ext/ext.c | 427 +++++++++-----
kernel/sched/ext/internal.h | 5 +-
kernel/sched/ext/types.h | 1 +
tools/testing/selftests/sched_ext/Makefile | 2 +
.../selftests/sched_ext/dequeue_remote.bpf.c | 34 +-
tools/testing/selftests/sched_ext/dequeue_remote.c | 37 +-
.../selftests/sched_ext/sub_caps_kfunc.bpf.c | 66 +++
tools/testing/selftests/sched_ext/sub_caps_kfunc.c | 107 ++++
.../selftests/sched_ext/sub_caps_kfunc_fail.bpf.c | 109 ++++
tools/testing/selftests/sched_ext/sub_core_caps.c | 616 +++++++++++++++++++++
.../selftests/sched_ext/sub_core_caps_root.bpf.c | 78 +++
.../selftests/sched_ext/sub_core_caps_sub.bpf.c | 84 +++
12 files changed, 1407 insertions(+), 159 deletions(-)
create mode 100644 tools/testing/selftests/sched_ext/sub_caps_kfunc.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/sub_caps_kfunc.c
create mode 100644 tools/testing/selftests/sched_ext/sub_caps_kfunc_fail.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/sub_core_caps.c
create mode 100644 tools/testing/selftests/sched_ext/sub_core_caps_root.bpf.c
create mode 100644 tools/testing/selftests/sched_ext/sub_core_caps_sub.bpf.c
--
tejun