mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amdgpu: don't leak bo_va when gem_object_open fails
drm_gem_handle_create_tail() skips the close() callback when open() returns an error, so a bo_va added before a failing step is never removed. It stays linked on bo->vm_bo and a later eviction of that BO dereferences the VM after it has been torn down. Validate and fence the BO before adding the bo_va, drop the bo_va when attaching the eviction fence fails, and propagate the allocation failure from amdgpu_vm_bo_add(). Signed-off-by: Xiang Liu <xiang.liu@amd.com> Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
78cdd96ab4
commit
a113d4d659
1 changed files with 45 additions and 35 deletions
Loading…
Add table
Add a link
Reference in a new issue