]> 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)
commit6b6e57d5c50a4b60c512e4b0de265389d70620b2
tree57ef454d2ad17ec82ad8e45374974dda76efb155
parent9ed447e8f696441ecafc9c9e8f3f5daf0a77ffdb
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