From: Mukul Joshi <[email protected]>

Initialize fence to NULL in UALink NPA unmap to make sure we
don't end with a garbage value which then gets incorrectly
dereferenced inside amdgpu_vm_tlb_flush().

Signed-off-by: Mukul Joshi <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
index d4a5304ee2d81..85276db902b15 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ualink.c
@@ -1490,7 +1490,7 @@ static int amdgpu_ualink_unmap_npa_addr(struct 
amdgpu_device *adev,
 {
        uint64_t pte_value = adev->gmc.noretry_flags;
        struct amdgpu_bo *bos[] = { bo };
-       struct dma_fence *fence;
+       struct dma_fence *fence = NULL;
        struct drm_exec exec;
        int r;
 
-- 
2.55.0

Reply via email to