[PATCH 17/25] drm/amdgpu: Check NULL pointer for job before reset job's ring
Felix Kuehling
Felix.Kuehling at amd.com
Thu Jul 12 02:33:00 UTC 2018
From: Shaoyun Liu <Shaoyun.Liu at amd.com>
job could be NULL when amdgpu_device_gpu_recover is called
Signed-off-by: Shaoyun Liu <Shaoyun.Liu at amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 470cc25..e463f36 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3215,7 +3215,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
if (job && job->ring->idx != i)
continue;
- drm_sched_hw_job_reset(&ring->sched, &job->base);
+ drm_sched_hw_job_reset(&ring->sched, job ? &job->base : NULL);
/* after all hw jobs are reset, hw fence is meaningless, so force_completion */
amdgpu_fence_driver_force_completion(ring);
--
2.7.4
More information about the amd-gfx
mailing list