Daily update · Sep 15–16, 2026
Linux mainline: sched_ext fixes, sysctl range checks
BPF scheduler fixes lead today's batch, with cgroup and sysctl corrections.
In brief
This batch is dominated by fixes for sched_ext, the BPF-based extensible scheduler: cgroup idle state is now passed correctly at startup, duplicate idle callbacks are suppressed, and several dispatch/error-path races are closed. The qmap example scheduler also gets four fixes for stalled tasks and missed partition updates. Separate patches restore dropped sysctl range checks and avoid a cgroup iterator race with dying tasks.
Bug fixes
Pass initial cgroup idle state and suppress duplicate idle callbacks
sched_ext now includes the cpu.idle state in scx_cgroup_init_args, so BPF schedulers see cgroups that were already configured idle before the scheduler was loaded. It also stops delivering ops.cgroup_set_idle() when the written value does not change, mirroring the existing guard for weight writes.
Why it matters: Gives BPF schedulers an accurate initial view of cgroup idle state and prevents repeated callbacks from confusing toggle- or accounting-based schedulers.
Use the correct scheduler in dispatch_one() keep decisions
dispatch_one() was checking the root scheduler's flags and bypass state when deciding whether to keep running @prev, even when @prev belongs to a sub-scheduler. The local variable is renamed to root_sch and the keep decisions now read from @prev's scheduler.
Why it matters: Avoids marking a sub-scheduler's last task with the last-task enqueue flag when that sub-scheduler did not opt in, and prevents the associated WARN_ON_ONCE.
Fix qmap example scheduler races and idle-claim handling
The scx_qmap sample scheduler gets four fixes: rescue inserts no longer add the IMMED flag, placements wait until a cid's caps are actually in effect, pending partition work is published before becoming the runner, and idle claims are restored from ops.dispatch() when a task never arrives.
Why it matters: Prevents rescue tasks from bouncing, tasks being placed on cids whose caps are not active yet, missed partition updates, and cids staying marked busy after an unused idle claim.
Fix sched_ext error-path NULL dereference and pre-enable race
Two core sched_ext fixes: the COMPAT kfunc wrappers scx_bpf_select_cpu_and() and scx_bpf_dsq_insert_vtime() no longer dereference a NULL scheduler when called with a task that has no scheduler. The pre-enable error claim window is closed so an error claimed by a BPF program cannot race with the enable work and leave the scheduler stuck and later freed while still in use.
Why it matters: Avoids NULL-pointer dereferences and a use-after-free in sched_ext error handling.
Avoid iterating cgroup dying tasks with zero refcount
The cgroup task iterator now avoids tasks on the dying_tasks list whose reference count has already dropped to zero, closing a race between cgroup_task_release() and cgroup_task_free().
Why it matters: Prevents the iterator from reaching tasks that are no longer safely referenceable.
Restore sysctl range checks and fix jiffies conversion truncation
Three sysctl fixes restore range checks in proc_dointvec_ms_jiffies_minmax and do_proc_ulong_conv_ms_jiffies that were accidentally removed during a refactor. sysctl_msec_to_jiffies also returns MAX_JIFFY_OFFSET instead of truncating very large millisecond values through a u64-to-u32 conversion.
Why it matters: Out-of-range writes are rejected again, and large millisecond values no longer wrap through type truncation.
Source commits15 entries +
sched_ext: Pass the initial cpu.idle state in scx_cgroup_init_args
Tao Cui · Aug 25, 2026 · 3 files
sched_ext: Don't deliver duplicate ops.cgroup_set_idle() for same value
Tao Cui · Sep 1, 2026 · 1 files
sched_ext: Fix NULL sched deref in kfunc sub-sched error paths
Wanwu Li · Sep 3, 2026 · 2 files
sched_ext: Rename sch to root_sch in dispatch_one()
Tejun Heo · Sep 5, 2026 · 1 files
sched_ext: Use @prev's scheduler for the keep decisions in dispatch_one()
Tejun Heo · Sep 5, 2026 · 1 files
sched_ext: scx_qmap: Do not add IMMED to rescue inserts
Tejun Heo · Sep 5, 2026 · 1 files
sched_ext: scx_qmap: Place only on cids whose caps are in effect
Tejun Heo · Sep 5, 2026 · 2 files
sched_ext: scx_qmap: Fix pending partition work handoff
Tejun Heo · Sep 5, 2026 · 1 files
sysctl: Check range in proc_dointvec_ms_jiffies_minmax
Kuniyuki Iwashima · Sep 5, 2026 · 1 files
sysctl: Check range in do_proc_ulong_conv_ms_jiffies
Kuniyuki Iwashima · Sep 5, 2026 · 1 files
sysctl: Fix type truncation in sysctl_msec_to_jiffies
Joel Granados · Sep 10, 2026 · 1 files
sched_ext: Close the pre-enable ops error claim window
fangqiurong · Sep 12, 2026 · 1 files
cgroup: Avoid iteration of dying tasks with zero refcount
Michal Koutný · Sep 14, 2026 · 1 files
sched_ext: scx_qmap: Restore unused idle claims from ops.dispatch()
Tejun Heo · Sep 15, 2026 · 2 files
sched_ext: Maintain an online cid mask in the scheduler arena
Tejun Heo · Sep 15, 2026 · 4 files