drm/amdgpu: fix NULL ptr dref in the VM code
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix NULL ptr dref in the VM code
The exclusive fence is of course perfectly optional here.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5 -3
@@ -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;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190207104318.12944-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
Kuehling, Felix
Reviewed-by Felix Kuehling________________________________________
From: amd-gfx <[email protected]> on behalf of Christian König <[email protected]>
Sent: Thursday, February 7, 2019 5:43 AM
To: [email protected]
Subject: [PATCH] drm/amdgpu: fix NULL ptr dref in the VM code
The exclusive fence is of course perfectly optional here.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5 -3
@@ -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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx