[PATCH] drm/xe/ xe_sync: Check NULL before dereferencing

Nirmoy Das nirmoy.das at linux.intel.com
Fri Mar 22 08:36:26 UTC 2024


On 12/6/2023 11:30 PM, Bommu Krishnaiah wrote:
> checking null pointer before dereferencing schedule job
>
> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> Cc: Tejas Upadhyay <tejas.upadhyay at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_sync.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index 02c9577fe418..3b977061bf9f 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -255,6 +255,9 @@ void xe_sync_entry_signal(struct xe_sync_entry *sync, struct xe_sched_job *job,
>   			dma_fence_put(fence);
>   		}
>   	} else if (sync->type == DRM_XE_SYNC_TYPE_USER_FENCE) {
> +		if (!job)
> +			drm_err(&sync->ufence->xe->drm, "No schedule job fond\n");

Looks like we are working on the same goal, I have sent 
https://patchwork.freedesktop.org/series/131371/ to for this.

Please review that instead.


Regards,

Nirmoy

> +
>   		job->user_fence.used = true;
>   		job->user_fence.addr = sync->addr;
>   		job->user_fence.value = sync->timeline_value;


More information about the Intel-xe mailing list