Re: [PATCH v2] sched_ext: Close the pre-enable ops error claim window
From: Tejun Heo
Date: Fri Sep 11 2026 - 12:01:27 EST
Hello, Qiurong.
On Fri, Sep 11, 2026 at 10:42:56AM +0800, Qiurong Fang wrote:
> + scx_tryset_enable_state(SCX_DISABLED, SCX_ENABLING);
All allocation failures precede ops->priv publication, so no disable can
race here and the state must still be SCX_ENABLING. Please use:
WARN_ON_ONCE(scx_set_enable_state(SCX_DISABLED) != SCX_ENABLING);
Please also update the moved comment. Allocation failure still unwinds
locally. Full disabling on failure applies only after
scx_alloc_and_add_sched() succeeds.
Thanks.
--
tejun