Commit 05e6330
sched_ext: Fix scx_kick_pseqs corruption on concurrent scheduler loads
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: 14c1da3 ("sched_ext: Allocate scx_kick_cpus_pnt_seqs lazily using kvzalloc()")
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>1 parent 14c1da3 commit 05e6330
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4577 | 4577 | | |
4578 | 4578 | | |
4579 | 4579 | | |
4580 | | - | |
4581 | | - | |
4582 | | - | |
4583 | | - | |
4584 | 4580 | | |
4585 | 4581 | | |
4586 | | - | |
| 4582 | + | |
4587 | 4583 | | |
4588 | 4584 | | |
| 4585 | + | |
| 4586 | + | |
| 4587 | + | |
| 4588 | + | |
4589 | 4589 | | |
4590 | 4590 | | |
4591 | 4591 | | |
| |||
0 commit comments