Skip to content

Commit 18fbd56

Browse files
committed
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>
1 parent 6b68c45 commit 18fbd56

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)