]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: fix kgd_mem memory leak when importing dmabuf
authorLang Yu <Lang.Yu@amd.com>
Tue, 26 Jul 2022 05:32:39 +0000 (13:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Jul 2022 20:05:16 +0000 (16:05 -0400)
commit8124abf0d5c4ca35c8639b6058fafaad217b038c
tree707a5596415a8b735ffd7cb9789560c46a565d0c
parentcfe8b8eff224d3eea1130ae18cc5c1cfe569fa90
drm/amdkfd: fix kgd_mem memory leak when importing dmabuf

The kgd_mem memory allocated in amdgpu_amdkfd_gpuvm_import_dmabuf()
is not freed properly.

Explicitly free it in amdgpu_amdkfd_gpuvm_free_memory_of_gpu()
under condition "mem->bo->kfd_bo != mem".

Suggested-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c