diff options
| author | Lin.Cao <[email protected]> | 2025-06-24 09:05:34 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-06-30 15:55:28 +0000 |
| commit | 8cf66089e28108dedd47e6156a48489303cf525c (patch) | |
| tree | 7742faee9360bedbd6c67074eb0a3c737b3bfb7e /drivers/gpu/drm/amd/amdgpu | |
| parent | drm/amdgpu: indent an if statement (diff) | |
| download | kernel-8cf66089e28108dedd47e6156a48489303cf525c.tar.gz kernel-8cf66089e28108dedd47e6156a48489303cf525c.zip | |
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 <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Acked-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 85567d0d9545..f5d5c45ddc0d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -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); } } |
