From 41aac9c5914fb2885ad63d96b403882767cb5f25 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 24 Aug 2023 06:01:11 +0000 Subject: [PATCH] drm/amdgpu: fix memory leak in mes self test From Jack Xiao ce3288d8d654b252ba832626e7de481c195ef20a in linux-6.1.y/6.1.47 31d7c3a4fc3d312a0646990767647925d5bde540 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c index d3558c34d40..296b2d5976a 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ring.c @@ -361,6 +361,8 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring) amdgpu_bo_free_kernel(&ring->ring_obj, &ring->gpu_addr, (void **)&ring->ring); + } else { + kfree(ring->fence_drv.fences); } dma_fence_put(ring->vmid_wait); -- 2.20.1