public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/xe: Fix missing xe_hw_engine_group_del_exec_queue() in error path
       [not found] <20260306165207.176758-1-shuicheng.lin@intel.com>
@ 2026-03-06 16:52 ` Shuicheng Lin
  0 siblings, 0 replies; only message in thread
From: Shuicheng Lin @ 2026-03-06 16:52 UTC (permalink / raw)
  To: intel-xe; +Cc: Shuicheng Lin, stable, Matthew Brost, Niranjana Vishwanathapura

When xa_alloc() fails after xe_hw_engine_group_add_exec_queue() has
already succeeded, xe_hw_engine_group_del_exec_queue() is never called
to undo the add.

Add xe_hw_engine_group_del_exec_queue() at the kill_exec_queue label
to fix it.

Fixes: 7970cb36966c ("drm/xe/hw_engine_group: Register hw engine group's exec queues")
Cc: stable@vger.kernel.org
Cc: Matthew Brost <matthew.brost@intel.com>
Suggested-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_exec_queue.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index 5c67185d5357..af915ccb4925 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -1408,6 +1408,8 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
 	return 0;
 
 kill_exec_queue:
+	if (q->vm && q->hwe->hw_engine_group)
+		xe_hw_engine_group_del_exec_queue(q->hwe->hw_engine_group, q);
 	xe_exec_queue_kill(q);
 delete_queue_group:
 	if (xe_exec_queue_is_multi_queue_secondary(q))
-- 
2.34.1


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

only message in thread, other threads:[~2026-03-06 16:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260306165207.176758-1-shuicheng.lin@intel.com>
2026-03-06 16:52 ` [PATCH v2 1/2] drm/xe: Fix missing xe_hw_engine_group_del_exec_queue() in error path Shuicheng Lin

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