drm/scheduler: fix drm_sched_get_cleanup_job
We are racing to initialize sched->thread here, just always check the current thread. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Kent Russell <kent.russell@amd.com> Link: https://patchwork.freedesktop.org/patch/361303/
This commit is contained in:
parent
d918fe4287
commit
8623b5255a
|
@ -676,7 +676,7 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
|
||||||
*/
|
*/
|
||||||
if ((sched->timeout != MAX_SCHEDULE_TIMEOUT &&
|
if ((sched->timeout != MAX_SCHEDULE_TIMEOUT &&
|
||||||
!cancel_delayed_work(&sched->work_tdr)) ||
|
!cancel_delayed_work(&sched->work_tdr)) ||
|
||||||
__kthread_should_park(sched->thread))
|
kthread_should_park())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
spin_lock(&sched->job_list_lock);
|
spin_lock(&sched->job_list_lock);
|
||||||
|
|
Loading…
Reference in New Issue