summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2020-04-11 12:54:01 +0300
committerChristian König <christian.koenig@amd.com>2020-04-15 12:09:13 +0300
commit8623b5255ae7ccaf276aac3920787bf575fa6b37 (patch)
tree491f2196bff1fb43e2314e6d91a748b2b09ad626 /drivers
parentd918fe4287153e06233ded08aa54f1ad41cb485b (diff)
downloadlinux-8623b5255ae7ccaf276aac3920787bf575fa6b37.tar.xz
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/
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/scheduler/sched_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 8e731ed0d9d9..2f319102ae9f 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -676,7 +676,7 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
*/
if ((sched->timeout != MAX_SCHEDULE_TIMEOUT &&
!cancel_delayed_work(&sched->work_tdr)) ||
- __kthread_should_park(sched->thread))
+ kthread_should_park())
return NULL;
spin_lock(&sched->job_list_lock);