]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched_ext: INIT_LIST_HEAD() &sch->all in scx_alloc_and_add_sched()
authorTejun Heo <tj@kernel.org>
Mon, 11 May 2026 23:18:19 +0000 (13:18 -1000)
committerTejun Heo <tj@kernel.org>
Tue, 12 May 2026 21:28:56 +0000 (11:28 -1000)
commitb273b75b8d677aea06dd06d80b61b3bb06e94680
treef74629178fcefc0be3f64b6ac2d1087b8f3bf371
parent39e25a2100604320e8d9df54c6c31258f7a3df29
sched_ext: INIT_LIST_HEAD() &sch->all in scx_alloc_and_add_sched()

On scx_link_sched() error paths (parent disabled, hash insert failure),
&sch->all is never added to scx_sched_all. The cleanup path runs
scx_unlink_sched() unconditionally, which calls list_del_rcu(&sch->all) on a
list_head that was never initialized triggering a corruption warning.

Initialize &sch->all.

Fixes: 54be8de4236a ("sched_ext: Factor out scx_link_sched() and scx_unlink_sched()")
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/ext.c