Executive brief
The Linux kernel's task scheduler extension (sched_ext) contains a logic error in its hardlockup detection handler that was suppressing error reports even when the abort operation failed. This could mask system instability caused by the BPF scheduler becoming unresponsive. The fix ensures that recovery attempts are properly reported and improves the reliability of hardlockup recovery on systems running the sched_ext scheduler.
Technical details
The scx_hardlockup() handler in the Linux kernel's sched_ext scheduler previously deferred abort handling through an irq_work callback because the exit-claiming path required a lock that was not NMI-safe. However, the implementation had two issues: (1) it returned true whenever sched_ext was loaded, even if the abort was refused, suppressing legitimate kernel hardlockup reports; and (2) the deferred irq_work could never execute when IRQs were disabled, making self-detected lockups unrecoverable. The fix calls handle_lockup() directly from NMI context (which is now safe), eliminating the defer mechanism and ensuring the return value accurately reflects whether an abort was actually initiated. This resolves dispatch-path live-locks by setting the ->aborting flag throughout the scheduler hierarchy.
Affected products
- Linux Linux kernel versions using sched_ext (Linux 6.x+)
Timeline
- 2026-09-17: disclosed
- 2026-07-27: patched