Commit e582951b authored by Andrey Grodzovsky's avatar Andrey Grodzovsky Committed by Christian König

drm/sched: Cancel and flush all outstanding jobs before finish.

To avoid any possible use after free.
Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/414814/
CC: stable@vger.kernel.org
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
parent b9d4efa8
......@@ -899,6 +899,9 @@ void drm_sched_fini(struct drm_gpu_scheduler *sched)
if (sched->thread)
kthread_stop(sched->thread);
/* Confirm no work left behind accessing device structures */
cancel_delayed_work_sync(&sched->work_tdr);
sched->ready = false;
}
EXPORT_SYMBOL(drm_sched_fini);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment