diff options
| author | Lin.Cao <[email protected]> | 2025-06-24 09:05:34 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-06-30 17:57:31 +0000 |
| commit | f3e58d8e154dae5015c7400812c80789589fc36e (patch) | |
| tree | 5de2faa92601add467a049a6b5024b4e7e7b88b7 /drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | |
| parent | drm/amdkfd: Don't call mmput from MMU notifier callback (diff) | |
| download | kernel-f3e58d8e154dae5015c7400812c80789589fc36e.tar.gz kernel-f3e58d8e154dae5015c7400812c80789589fc36e.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]>
(cherry picked from commit 8cf66089e28108dedd47e6156a48489303cf525c)
Cc: [email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c')
| -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); } } |
