possible amdgpu_task_info reference leak

André Almeida andrealmeid at igalia.com
Fri Jul 4 02:57:35 UTC 2025


Hi Dave,

Em 03/07/2025 20:59, Dave Airlie escreveu:
> In this commit :
> a72002cb181f350734108228b24c5d10d358f95a
> Author: André Almeida <andrealmeid at igalia.com>
> Date:   Tue Jun 17 09:49:49 2025 -0300
> 
>      drm/amdgpu: Make use of drm_wedge_task_info
> 
> 
> 
> @@ -164,13 +165,15 @@ static enum drm_gpu_sched_stat
> amdgpu_job_timedout(struct drm_sched_job *s_job)
>                          if (amdgpu_ring_sched_ready(ring))
>                                  drm_sched_start(&ring->sched, 0);
>                          dev_err(adev->dev, "Ring %s reset
> succeeded\n", ring->sched.name);
> -                       drm_dev_wedged_event(adev_to_drm(adev),
> DRM_WEDGE_RECOVERY_NONE, NULL);
> +                       drm_dev_wedged_event(adev_to_drm(adev),
> DRM_WEDGE_RECOVERY_NONE, info);
>                          goto exit;
>                  }
>                  dev_err(adev->dev, "Ring %s reset failure\n", ring->sched.name);
>          }
>          dma_fence_set_error(&s_job->s_fence->finished, -ETIME);
> 
> +       amdgpu_vm_put_task_info(ti);
> +
>          if (amdgpu_device_should_recover_gpu(ring->adev)) {
>                  struct amdgpu_reset_context reset_context;
>                  memset(&reset_context, 0, sizeof(reset_context));
> 
> 
> Doesn't the goto_exit bypass the amdgpu_vm_put_task_info? and cause a
> reference leak at least?
> 

Yep, I think you are right. Let me send a fix for this.

> Dave.



More information about the dri-devel mailing list