Skip to content

Commit 12c2f96

Browse files
tejasuprodrigovivi
authored andcommitted
drm/xe: cancel pending job timer before freeing scheduler
The async call to __guc_exec_queue_fini_async frees the scheduler while a submission may time out and restart. To prevent this race condition, the pending job timer should be canceled before freeing the scheduler. V3(MattB): - Adjust position of cancel pending job - Remove gitlab issue# from commit message V2(MattB): - Cancel pending jobs before scheduler finish Fixes: a20c75d ("drm/xe: Call __guc_exec_queue_fini_async direct for KERNEL exec_queues") Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250225045754.600905-1-tejas.upadhyay@intel.com Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com> (cherry picked from commit 18fbd56) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent f2ba0cf commit 12c2f96

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/xe/xe_guc_submit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,8 @@ static void __guc_exec_queue_fini_async(struct work_struct *w)
12481248

12491249
if (xe_exec_queue_is_lr(q))
12501250
cancel_work_sync(&ge->lr_tdr);
1251+
/* Confirm no work left behind accessing device structures */
1252+
cancel_delayed_work_sync(&ge->sched.base.work_tdr);
12511253
release_guc_id(guc, q);
12521254
xe_sched_entity_fini(&ge->entity);
12531255
xe_sched_fini(&ge->sched);

0 commit comments

Comments
 (0)