[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200430135043.19851-23-sashal@kernel.org>
Date: Thu, 30 Apr 2020 09:49:47 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Christian König <christian.koenig@....com>,
Andrey Grodzovsky <andrey.grodzovsky@....com>,
Kent Russell <kent.russell@....com>,
Sasha Levin <sashal@...nel.org>,
dri-devel@...ts.freedesktop.org
Subject: [PATCH AUTOSEL 5.6 23/79] drm/scheduler: fix drm_sched_get_cleanup_job
From: Christian König <christian.koenig@....com>
[ Upstream commit 8623b5255ae7ccaf276aac3920787bf575fa6b37 ]
We are racing to initialize sched->thread here, just always check the
current thread.
Signed-off-by: Christian König <christian.koenig@....com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@....com>
Reviewed-by: Kent Russell <kent.russell@....com>
Link: https://patchwork.freedesktop.org/patch/361303/
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/scheduler/sched_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 60c4c6a1aac68..75737ec596141 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -687,7 +687,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_irqsave(&sched->job_list_lock, flags);
--
2.20.1
Powered by blists - more mailing lists