mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
drm/sched: Cancel and flush all outstanding jobs before finish.
commit e582951baabba3e278c97169d0acc1e09b24a72e upstream. To avoid any possible use after free. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/414814/ CC: stable@vger.kernel.org Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c38fd6afe1
commit
4d09487509
1 changed files with 3 additions and 0 deletions
|
|
@ -851,6 +851,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue