Skip to content

Commit 7838fb5

Browse files
committed
drm/amdgpu: fix a memory leak in fence cleanup when unloading
Commit b61badd ("drm/amdgpu: fix usage slab after free") reordered when amdgpu_fence_driver_sw_fini() was called after that patch, amdgpu_fence_driver_sw_fini() effectively became a no-op as the sched entities we never freed because the ring pointers were already set to NULL. Remove the NULL setting. Reported-by: Lin.Cao <lincao12@amd.com> Cc: Vitaly Prosyak <vitaly.prosyak@amd.com> Cc: Christian König <christian.koenig@amd.com> Fixes: b61badd ("drm/amdgpu: fix usage slab after free") Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit a525fa3) Cc: stable@vger.kernel.org
1 parent 5350355 commit 7838fb5

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,6 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring)
421421
dma_fence_put(ring->vmid_wait);
422422
ring->vmid_wait = NULL;
423423
ring->me = 0;
424-
425-
ring->adev->rings[ring->idx] = NULL;
426424
}
427425

428426
/**

0 commit comments

Comments
 (0)