drm/amdkfd: Fix memory leakage
authorKonstantin Meskhidze <konstantin.meskhidze@huawei.com>
Tue, 29 Nov 2022 04:02:54 +0000 (23:02 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:14 +0000 (13:14 +0100)
commit8876793e56ec69b3be2a883b4bc440df3dbb1865
treefba6c11ea3017bed3639d31c06cba343edd1c736
parent8f2d2badf8ca5e7e7c30d88840b695c8af7286f3
drm/amdkfd: Fix memory leakage

[ Upstream commit 75818afff631e1ea785a82c3e8bb82eb0dee539c ]

This patch fixes potential memory leakage and seg fault
in  _gpuvm_import_dmabuf() function

Fixes: d4ec4bdc0bd5 ("drm/amdkfd: Allow access for mmapping KFD BOs")
Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c