[PATCH] drm/amdgpu: fix NULL ptr dref in the VM code
Christian König
ckoenig.leichtzumerken at gmail.com
Thu Feb 7 10:43:18 UTC 2019
The exclusive fence is of course perfectly optional here.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 5c935009091a..5d7c191044fc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1787,9 +1787,11 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
return r;
/* Wait for any BO move to be completed */
- r = dma_fence_wait(exclusive, true);
- if (unlikely(r))
- return r;
+ if (exclusive) {
+ r = dma_fence_wait(exclusive, true);
+ if (unlikely(r))
+ return r;
+ }
params.func = amdgpu_vm_cpu_set_ptes;
params.pages_addr = pages_addr;
--
2.17.1
More information about the amd-gfx
mailing list