diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-06 02:12:37 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2024-05-06 02:12:37 +0000 |
commit | c5c3a3fdb82d08931aba83917e29300c61b69a5c (patch) | |
tree | cddc0cf374e6857bae57d5a9f2fd6db3bb594ddf | |
parent | b1efbdab7cd01c69a3a81c4bae012efa77269c9b (diff) |
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
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |