Skip to content

Commit f3e58d8

Browse files
Lin.Caoalexdeucher
authored andcommitted
drm/amdgpu: Fix memory leak in amdgpu_ctx_mgr_entity_fini
patch dd64956 ("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: dd64956 ("drm/amdgpu: Remove duplicated "context still alive" check") Signed-off-by: Lin.Cao <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 8cf6608) Cc: [email protected]
1 parent cf23423 commit f3e58d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ static void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
944944
drm_sched_entity_fini(entity);
945945
}
946946
}
947+
kref_put(&ctx->refcount, amdgpu_ctx_fini);
947948
}
948949
}
949950

0 commit comments

Comments
 (0)