diff options
author | Christian König <christian.koenig@amd.com> | 2020-04-11 11:54:01 +0200 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-04-15 11:09:13 +0200 |
commit | 8623b5255ae7ccaf276aac3920787bf575fa6b37 (patch) | |
tree | 491f2196bff1fb43e2314e6d91a748b2b09ad626 | |
parent | d918fe4287153e06233ded08aa54f1ad41cb485b (diff) | |
download | linux-stable-8623b5255ae7ccaf276aac3920787bf575fa6b37.tar.gz linux-stable-8623b5255ae7ccaf276aac3920787bf575fa6b37.tar.bz2 linux-stable-8623b5255ae7ccaf276aac3920787bf575fa6b37.zip |
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/
-rw-r--r-- | drivers/gpu/drm/scheduler/sched_main.c | 2 |
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); |