From: jsg Date: Mon, 6 May 2024 02:12:36 +0000 (+0000) Subject: drm/amdgpu: Fix leak when GPU memory allocation fails X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=683ee047e55d47fa7d089b76fc7c0bec4109e133;p=openbsd drm/amdgpu: Fix leak when GPU memory allocation fails From Mukul Joshi d7d7284c2a7c67ea5f07eb28d8c2ea0f3ee4b86b in linux-6.6.y/6.6.30 25e9227c6afd200bed6774c866980b8e36d033af in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index d4755519ba5..6044d3fc845 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -1785,6 +1785,7 @@ err_node_allow: err_bo_create: amdgpu_amdkfd_unreserve_mem_limit(adev, aligned_size, flags, xcp_id); err_reserve_limit: + amdgpu_sync_free(&(*mem)->sync); mutex_destroy(&(*mem)->lock); if (gobj) drm_gem_object_put(gobj);