Re: [PATCH v2 sched_ext/for-7.1-fixes] sched_ext: Fix ops->priv clobber on concurrent attach/detach

From: Tejun Heo

Date: Mon May 11 2026 - 03:53:39 EST


Hello, Andrea.

Applied to sched_ext/for-7.1-fixes.

One followup if you have cycles: scx_alloc_and_add_sched() can still
fail after rcu_assign_pointer(ops->priv, sch) (sub-sched
kzalloc/kstrdup and kobject paths). With the new gate, that would
leave the kdata permanently -EBUSY. Could probably be addressed by
clearing @ops->priv on those error paths.

Thanks.
--
tejun