On 12/19/25 14:42, Tvrtko Ursulin wrote:
> According to Christian the skip can only cause memory leaks if it would to
> trigger, while it does nothing for the fact context manager will still get
> zapped with live back references from dangling contexts.
> 
> Signed-off-by: Tvrtko Ursulin <[email protected]>
> Suggested-by: Christian König <[email protected]>

Reviewed-by: Christian König <[email protected]>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index f3d5a7180bda..b69dd3061e2c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> @@ -894,14 +894,8 @@ static void amdgpu_ctx_mgr_entity_fini(struct 
> amdgpu_ctx_mgr *mgr)
>       struct amdgpu_ctx *ctx;
>       uint32_t id;
>  
> -     idr_for_each_entry(&mgr->ctx_handles, ctx, id) {
> -             if (kref_read(&ctx->refcount) != 1) {
> -                     DRM_ERROR("ctx %p is still alive\n", ctx);
> -                     continue;
> -             }
> -
> +     idr_for_each_entry(&mgr->ctx_handles, ctx, id)
>               amdgpu_ctx_put(ctx);
> -     }
>  }
>  
>  void amdgpu_ctx_mgr_fini(struct amdgpu_ctx_mgr *mgr)

Reply via email to