mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
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
This commit is contained in:
@@ -4479,8 +4479,11 @@ static struct scx_sched *scx_alloc_and_add_sched(struct sched_ext_ops *ops)
|
|||||||
goto err_free_gdsqs;
|
goto err_free_gdsqs;
|
||||||
|
|
||||||
sch->helper = kthread_run_worker(0, "sched_ext_helper");
|
sch->helper = kthread_run_worker(0, "sched_ext_helper");
|
||||||
if (!sch->helper)
|
if (IS_ERR(sch->helper)) {
|
||||||
|
ret = PTR_ERR(sch->helper);
|
||||||
goto err_free_pcpu;
|
goto err_free_pcpu;
|
||||||
|
}
|
||||||
|
|
||||||
sched_set_fifo(sch->helper->task);
|
sched_set_fifo(sch->helper->task);
|
||||||
|
|
||||||
atomic_set(&sch->exit_kind, SCX_EXIT_NONE);
|
atomic_set(&sch->exit_kind, SCX_EXIT_NONE);
|
||||||
|
|||||||
Reference in New Issue
Block a user