diff options
| author | Tejun Heo <tj@kernel.org> | 2026-02-24 21:39:58 -1000 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-02-24 21:39:58 -1000 |
| commit | 83236b2e43dba00bee5b82eb5758816b1a674f6a (patch) | |
| tree | 0584f51e935725ecb34e9aecf0c6c8e97525e58a /include/linux/i2c/git@git.tavy.me:linux.git | |
| parent | ee0ff6690f2641b8f6ba8026ec17f6bc48f86649 (diff) | |
sched_ext: Disable preemption between scx_claim_exit() and kicking helper work
scx_claim_exit() atomically sets exit_kind, which prevents scx_error() from
triggering further error handling. After claiming exit, the caller must kick
the helper kthread work which initiates bypass mode and teardown.
If the calling task gets preempted between claiming exit and kicking the
helper work, and the BPF scheduler fails to schedule it back (since error
handling is now disabled), the helper work is never queued, bypass mode
never activates, tasks stop being dispatched, and the system wedges.
Disable preemption across scx_claim_exit() and the subsequent work kicking
in all callers - scx_disable() and scx_vexit(). Add
lockdep_assert_preemption_disabled() to scx_claim_exit() to enforce the
requirement.
Fixes: f0e1a0643a59 ("sched_ext: Implement BPF extensible scheduler class")
Cc: stable@vger.kernel.org # v6.12+
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
