Re: [PATCH sched_ext/for-6.18-fixes] sched_ext: Fix scx_kick_pseqs corruption on concurrent scheduler loads
From: Tejun Heo
Date: Tue Oct 14 2025 - 16:29:34 EST
On Mon, Oct 13, 2025 at 10:36:34PM +0200, Andrea Righi wrote:
> If we load a BPF scheduler while another scheduler is already running,
> alloc_kick_pseqs() would be called again, overwriting the previously
> allocated arrays.
>
> Fix by moving the alloc_kick_pseqs() call after the scx_enable_state()
> check, ensuring that the arrays are only allocated when a scheduler can
> actually be loaded.
>
> Fixes: 14c1da3895a11 ("sched_ext: Allocate scx_kick_cpus_pnt_seqs lazily using kvzalloc()")
> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
Applied to sched_ext/for-6.18-fixes.
Thanks.
--
tejun