]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Fix dangling kfd_bo pointer for shared BOs
authorFelix Kuehling <Felix.Kuehling@amd.com>
Thu, 4 Nov 2021 19:11:04 +0000 (15:11 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 Nov 2021 18:12:45 +0000 (14:12 -0400)
commitb488eefc0bf623860c0d3c5f75c2020e299d19f2
tree57ef454d2ad17ec82ad8e45374974dda76efb155
parent2c1c096de7d1786bcf04f566d0a2f722d54f7642
drm/amdgpu: Fix dangling kfd_bo pointer for shared BOs

If a kfd_bo was shared (e.g. a dmabuf export), the original kfd_bo may be
freed when the amdgpu_bo still lives on. Free the kfd_bo struct in the
release_notify callback then the amdgpu_bo is freed.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-By: Ramesh Errabolu <Ramesh.Errabolu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c