From: Monk Liu Date: Thu, 11 May 2017 05:59:15 +0000 (+0800) Subject: drm/amdgpu:use job's list instead of check fence X-Git-Tag: v4.13-rc1~45^2~24^2~272 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f059ecdcec2dd6fab757a16cc552093bfd321ee;p=platform%2Fkernel%2Flinux-exynos.git drm/amdgpu:use job's list instead of check fence because if the fence is really signaled, it could already released so the fence pointer is a wild pointer, but if we use job->base.node we are safe because job will not be released untill amdgpu_job_timedout finished. Signed-off-by: Monk Liu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 8b0f486..d1385eb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2644,9 +2644,9 @@ int amdgpu_sriov_gpu_reset(struct amdgpu_device *adev, struct amdgpu_job *job) if (job && j != i) continue; - /* here give the last chance to check if fence signaled + /* here give the last chance to check if job removed from mirror-list * since we already pay some time on kthread_park */ - if (job && dma_fence_is_signaled(&job->base.s_fence->finished)) { + if (job && list_empty(&job->base.node)) { kthread_unpark(ring->sched.thread); goto give_up_reset; }