mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: Fix memory leak in amdgpu_ctx_mgr_entity_fini
patchdd64956685("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:dd64956685("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 commit8cf66089e2) Cc: stable@vger.kernel.org
This commit is contained in:
@@ -944,6 +944,7 @@ static void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
|
||||
drm_sched_entity_fini(entity);
|
||||
}
|
||||
}
|
||||
kref_put(&ctx->refcount, amdgpu_ctx_fini);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user