]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/amdkfd: Fix leak in dmabuf import
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 8 Dec 2020 17:23:15 +0000 (12:23 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 20 Jan 2021 13:26:14 +0000 (14:26 +0100)
commit95223365d47a1f2d67f0e48de8773191d813a4c5
treed8e6569475255e2dfe7c2081ed3a75a3371ae39e
parent98d5514d6287c24dfc812f2a5ddedd5206059960
drm/amdkfd: Fix leak in dmabuf import

BugLink: https://bugs.launchpad.net/bugs/1910822
[ Upstream commit c897934da15f182ce99536007f8ef61c4748c07e ]

Release dmabuf reference before returning from kfd_ioctl_import_dmabuf.
amdgpu_amdkfd_gpuvm_import_dmabuf takes a reference to the underlying
GEM BO and doesn't keep the reference to the dmabuf wrapper.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c