Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/xe/vf: Start re-emission from first unsignaled job during VF migration
@ 2025-11-27  6:46 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2025-11-27  6:46 UTC (permalink / raw)
  To: Matthew Brost; +Cc: intel-xe

Hello Matthew Brost,

Commit 00937fe1921a ("drm/xe/vf: Start re-emission from first
unsignaled job during VF migration") from Nov 21, 2025 (linux-next),
leads to the following Smatch static checker warning:

	drivers/gpu/drm/xe/xe_guc_submit.c:2265 guc_exec_queue_unpause_prepare()
	warn: iterator used outside loop: 'job'

drivers/gpu/drm/xe/xe_guc_submit.c
    2247 static void guc_exec_queue_unpause_prepare(struct xe_guc *guc,
    2248                                            struct xe_exec_queue *q)
    2249 {
    2250         struct xe_gpu_scheduler *sched = &q->guc->sched;
    2251         struct xe_sched_job *job = NULL;
    2252         bool restore_replay = false;
    2253 
    2254         list_for_each_entry(job, &sched->base.pending_list, drm.list) {
    2255                 restore_replay |= job->restore_replay;
    2256                 if (restore_replay) {
    2257                         xe_gt_dbg(guc_to_gt(guc), "Replay JOB - guc_id=%d, seqno=%d",
    2258                                   q->guc->id, xe_sched_job_seqno(job));
    2259 
    2260                         q->ring_ops->emit_job(job);
    2261                         job->restore_replay = true;
    2262                 }
    2263         }
    2264 
--> 2265         if (job)
    2266                 job->last_replay = true;

job is never NULL here, it's a pointer to an offset from the list_head.
So this corrupts memory.

    2267 }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-27  6:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-27  6:46 [bug report] drm/xe/vf: Start re-emission from first unsignaled job during VF migration Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox