Skip to content

Commit fd95357

Browse files
committed
Merge tag 'sched_ext-for-6.18-rc6-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext
Pull sched_ext fix from Tejun Heo: "One low risk and obvious fix: scx_enable() was dereferencing an error pointer on helper kthread creation failure. Fixed" * tag 'sched_ext-for-6.18-rc6-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext: sched_ext: Fix scx_enable() crash on helper kthread creation failure
2 parents c966813 + 7b6216b commit fd95357

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernel/sched/ext.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4479,8 +4479,11 @@ static struct scx_sched *scx_alloc_and_add_sched(struct sched_ext_ops *ops)
44794479
goto err_free_gdsqs;
44804480

44814481
sch->helper = kthread_run_worker(0, "sched_ext_helper");
4482-
if (!sch->helper)
4482+
if (IS_ERR(sch->helper)) {
4483+
ret = PTR_ERR(sch->helper);
44834484
goto err_free_pcpu;
4485+
}
4486+
44844487
sched_set_fifo(sch->helper->task);
44854488

44864489
atomic_set(&sch->exit_kind, SCX_EXIT_NONE);

0 commit comments

Comments
 (0)