← Back to archive

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.

93d88ac4a44829871903f3a3

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.

3265ef0b670190f19b2816f5

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.

a0d356696f8763b4ff62224489ff16f071399a0b159ff18c

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.

0a85182723b6c7a1c6e8004a

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.

057dac23d329

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.

82431877d837318012c56576afdf35cfae0d

Source commits15 entries +
93d88ac4a448

sched_ext: Pass the initial cpu.idle state in scx_cgroup_init_args

Tao Cui · Aug 25, 2026 · 3 files

29871903f3a3

sched_ext: Don't deliver duplicate ops.cgroup_set_idle() for same value

Tao Cui · Sep 1, 2026 · 1 files

0a85182723b6

sched_ext: Fix NULL sched deref in kfunc sub-sched error paths

Wanwu Li · Sep 3, 2026 · 2 files

3265ef0b6701

sched_ext: Rename sch to root_sch in dispatch_one()

Tejun Heo · Sep 5, 2026 · 1 files

90f19b2816f5

sched_ext: Use @prev's scheduler for the keep decisions in dispatch_one()

Tejun Heo · Sep 5, 2026 · 1 files

a0d356696f87

sched_ext: scx_qmap: Do not add IMMED to rescue inserts

Tejun Heo · Sep 5, 2026 · 1 files

63b4ff622244

sched_ext: scx_qmap: Place only on cids whose caps are in effect

Tejun Heo · Sep 5, 2026 · 2 files

89ff16f07139

sched_ext: scx_qmap: Fix pending partition work handoff

Tejun Heo · Sep 5, 2026 · 1 files

82431877d837

sysctl: Check range in proc_dointvec_ms_jiffies_minmax

Kuniyuki Iwashima · Sep 5, 2026 · 1 files

318012c56576

sysctl: Check range in do_proc_ulong_conv_ms_jiffies

Kuniyuki Iwashima · Sep 5, 2026 · 1 files

afdf35cfae0d

sysctl: Fix type truncation in sysctl_msec_to_jiffies

Joel Granados · Sep 10, 2026 · 1 files

c7a1c6e8004a

sched_ext: Close the pre-enable ops error claim window

fangqiurong · Sep 12, 2026 · 1 files

057dac23d329

cgroup: Avoid iteration of dying tasks with zero refcount

Michal Koutný · Sep 14, 2026 · 1 files

9a0b159ff18c

sched_ext: scx_qmap: Restore unused idle claims from ops.dispatch()

Tejun Heo · Sep 15, 2026 · 2 files

a9e3760b0838

sched_ext: Maintain an online cid mask in the scheduler arena

Tejun Heo · Sep 15, 2026 · 4 files