mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
accel/rocket: Don't tear down the scheduler when drm_sched_init() fails
drm_sched_init() cleans up after itself when it fails, but
rocket_job_init() then calls drm_sched_fini() on the same scheduler.
That wakes a wait queue that was never initialised, dereferencing a
NULL pointer, and can destroy the submit workqueue a second time.
Only destroy the reset workqueue on this path.
Fixes: 0810d5ad88 ("accel/rocket: Add job submission IOCTL")
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/20260912114524.7A6131F00893@smtp.kernel.org/
Signed-off-by: Sidong Yang <sidong.yang@furiosa.ai>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20261004164727.466164-2-sidong.yang@furiosa.ai
This commit is contained in:
parent
3e32932d36
commit
a6709a58a0
|
|
@ -494,8 +494,6 @@ int rocket_job_init(struct rocket_core *core)
|
|||
return 0;
|
||||
|
||||
err_sched:
|
||||
drm_sched_fini(&core->sched);
|
||||
|
||||
destroy_workqueue(core->reset.wq);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user