[PATCH 2/2] drm/xe/ufence: Warn if mmget_not_zero() fails

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Oct 15 12:48:19 UTC 2024


Please change this to a XE_IOCTL_DBG, don't use XE_WARN_ON as it can potentially be triggered on process exit.

Den 2024-10-15 kl. 11:05, skrev Nirmoy Das:
> This shouldn't happen but seen this while debugging ufence timeout
> issue time to time so log it to isolate this particular case.
> 
> Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1630
> Cc: Matthew Brost <matthew.brost at intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
> Reviewed-by: Francois Dugast <francois.dugast at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_sync.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index 2e72c06fd40d..22f72df36ab2 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -83,6 +83,8 @@ static void user_fence_worker(struct work_struct *w)
>  			XE_WARN_ON("Copy to user failed");
>  		kthread_unuse_mm(ufence->mm);
>  		mmput(ufence->mm);
> +	} else {
> +		XE_WARN_ON("mmget_not_zero() failed");
>  	}
>  
>  	wake_up_all(&ufence->xe->ufence_wq);



More information about the Intel-xe mailing list