amd-drm-fixes-6.6-2023-10-19:
amdgpu: - Fix possible NULL pointer dereference - Avoid possible BUG_ON in GPUVM updates -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCZTHVxAAKCRC93/aFa7yZ 2EtYAQCiX4bJYT8ecBouDhvuBWL0zn7UtVhA4LgOOvoNgLo8wQD/Vldahq7taudh cAXz93p4hPGmIk6jro+nu5MPKBoblQc= =wJrH -----END PGP SIGNATURE----- Merge tag 'amd-drm-fixes-6.6-2023-10-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.6-2023-10-19: amdgpu: - Fix possible NULL pointer dereference - Avoid possible BUG_ON in GPUVM updates Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231020012417.4876-1-alexander.deucher@amd.com
This commit is contained in:
commit
d844fd038f
@ -403,6 +403,9 @@ amdgpu_dma_buf_move_notify(struct dma_buf_attachment *attach)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Reserve fences for two SDMA page table updates */
|
||||
r = dma_resv_reserve_fences(resv, 2);
|
||||
if (!r)
|
||||
r = amdgpu_vm_clear_freed(adev, vm, NULL);
|
||||
if (!r)
|
||||
r = amdgpu_vm_handle_moved(adev, vm);
|
||||
|
@ -1090,7 +1090,8 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,
|
||||
struct drm_gem_object *gobj = dma_buf->priv;
|
||||
struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj);
|
||||
|
||||
if (abo->tbo.resource->mem_type == TTM_PL_VRAM)
|
||||
if (abo->tbo.resource &&
|
||||
abo->tbo.resource->mem_type == TTM_PL_VRAM)
|
||||
bo = gem_to_amdgpu_bo(gobj);
|
||||
}
|
||||
mem = bo->tbo.resource;
|
||||
|
Loading…
Reference in New Issue
Block a user