]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/amdgpu: Fix double free of dmabuf
authorxinhui pan <xinhui.pan@amd.com>
Fri, 19 Nov 2021 10:08:31 +0000 (18:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Nov 2021 19:59:08 +0000 (14:59 -0500)
commit4aaea9d72e9aa01bfad7f48b3ad9d0ed591e7cb2
tree21ef11753355f78416028b4bee18004482adf437
parenta0e7e140b5b2cb76e9b455e548234c22585001b6
drm/amdgpu: Fix double free of dmabuf

amdgpu_amdkfd_gpuvm_free_memory_of_gpu drop dmabuf reference increased in
amdgpu_gem_prime_export.
amdgpu_bo_destroy drop dmabuf reference increased in
amdgpu_gem_prime_import.

So remove this extra dma_buf_put to avoid double free.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Tested-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c