diff options
| author | 2026-03-14 09:39:34 +0800 | |
|---|---|---|
| committer | 2026-03-13 23:00:53 -1000 | |
| commit | e36bc38ebfac95ecd088d4bc0ceb3ffcef2ebdfa (patch) | |
| tree | 94f201b97ee3f37a9faaa7548cc22c9ed72b0056 /rust/kernel/num/ssh:/git@git.zx2c4.com | |
| parent | selftests/sched_ext: Update scx_bpf_dsq_move_to_local() in kselftests (diff) | |
sched_ext: Fix uninitialized ret in scx_alloc_and_add_sched()
Under CONFIG_EXT_SUB_SCHED, the kzalloc() and kstrdup() failure
paths jump to err_stop_helper without first setting ret. The
function then returns ERR_PTR(ret) with ret uninitialized, which
can produce ERR_PTR(0) (NULL), causing the caller's IS_ERR() check
to pass and leading to a NULL pointer dereference.
Set ret = -ENOMEM before each goto to fix the error path.
Fixes: ebeca1f930ea ("sched_ext: Introduce cgroup sub-sched support")
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/kernel/num/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
