[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aO6yrTkjUqMrq3cH@slm.duckdns.org>
Date: Tue, 14 Oct 2025 10:29:33 -1000
From: Tejun Heo <tj@...nel.org>
To: Andrea Righi <arighi@...dia.com>
Cc: David Vernet <void@...ifault.com>, Changwoo Min <changwoo@...lia.com>,
Phil Auld <pauld@...hat.com>,
Emil Tsalapatis <emil@...alapatis.com>, sched-ext@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH sched_ext/for-6.18-fixes] sched_ext: Fix scx_kick_pseqs
corruption on concurrent scheduler loads
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@...dia.com>
Applied to sched_ext/for-6.18-fixes.
Thanks.
--
tejun
Powered by blists - more mailing lists