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

Nirmoy Das nirmoy.das at intel.com
Tue Oct 15 12:59:49 UTC 2024


On 10/15/2024 2:48 PM, Maarten Lankhorst wrote:
> Please change this to a XE_IOCTL_DBG, don't use XE_WARN_ON as it can potentially be triggered on process exit.

I missed this point last time. Agree, this can be triggered on process exist, I will make it drm_dbg which is same as XE_IOCTL_DBG. 

XE_IOCTL_DBG would look odd here.


Regards,

Nirmoy

>
> 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