]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu: Fix memory leak in amdgpu_ctx_mgr_entity_fini
authorLin.Cao <lincao12@amd.com>
Tue, 24 Jun 2025 09:05:34 +0000 (17:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Jun 2025 17:57:31 +0000 (13:57 -0400)
commitf3e58d8e154dae5015c7400812c80789589fc36e
tree5de2faa92601add467a049a6b5024b4e7e7b88b7
parentcf234231fcbc7d391e2135b9518613218cc5347f
drm/amdgpu: Fix memory leak in amdgpu_ctx_mgr_entity_fini

patch dd64956685fa ("drm/amdgpu: Remove duplicated "context still
alive" check") removed ctx put, which will cause amdgpu_ctx_fini()
cannot be called and then cause some finished fence that added by
amdgpu_ctx_add_fence() cannot be released and cause memleak.

Fixes: dd64956685fa ("drm/amdgpu: Remove duplicated "context still alive" check")
Signed-off-by: Lin.Cao <lincao12@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 8cf66089e28108dedd47e6156a48489303cf525c)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c