summaryrefslogtreecommitdiff
path: root/kernel/sched/ext.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-11-20 11:04:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2025-11-20 11:04:37 -0800
commitfd95357fd8c6778ac7dea6c57a19b8b182b6e91f (patch)
treef697dd725c42c5f83673d2b39ac3574dda8bf17a /kernel/sched/ext.c
parentc966813ea1206abc50a4447cb05cd7419e506806 (diff)
parent7b6216baae751369195fa3c83d434d23bcda406a (diff)
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
Diffstat (limited to 'kernel/sched/ext.c')
-rw-r--r--kernel/sched/ext.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 7aae1d0ce37e..979484dab2d3 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -4479,8 +4479,11 @@ static struct scx_sched *scx_alloc_and_add_sched(struct sched_ext_ops *ops)
goto err_free_gdsqs;
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;
+ }
+
sched_set_fifo(sch->helper->task);
atomic_set(&sch->exit_kind, SCX_EXIT_NONE);