Skip to content

Commit

Permalink
drm/amdgpu: fix memory leak in mes self test
Browse files Browse the repository at this point in the history
The fences associated with mes queue have to be freed
up during amdgpu_ring_fini.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Jack Xiao authored and alexdeucher committed Apr 24, 2023
1 parent 89d8445 commit 31d7c3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,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);
Expand Down

0 comments on commit 31d7c3a

Please sign in to comment.