* [PATCH 0/2] Fix error path of xe_exec_queue_create_ioctl()
@ 2026-03-06 3:00 Shuicheng Lin
2026-03-06 3:00 ` [PATCH 1/2] drm/xe: Fix missing xe_hw_engine_group_del_exec_queue() in error path Shuicheng Lin
2026-03-06 3:00 ` [PATCH 2/2] drm/xe: Fix exec queue unwind on hw engine group add failure Shuicheng Lin
0 siblings, 2 replies; 3+ messages in thread
From: Shuicheng Lin @ 2026-03-06 3:00 UTC (permalink / raw)
To: intel-xe; +Cc: Shuicheng Lin
Split to 2 patches due to different Fixes tag.
Shuicheng Lin (2):
drm/xe: Fix missing xe_hw_engine_group_del_exec_queue() in error path
drm/xe: Fix exec queue unwind on hw engine group add failure
drivers/gpu/drm/xe/xe_exec_queue.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] drm/xe: Fix missing xe_hw_engine_group_del_exec_queue() in error path
2026-03-06 3:00 [PATCH 0/2] Fix error path of xe_exec_queue_create_ioctl() Shuicheng Lin
@ 2026-03-06 3:00 ` Shuicheng Lin
2026-03-06 3:00 ` [PATCH 2/2] drm/xe: Fix exec queue unwind on hw engine group add failure Shuicheng Lin
1 sibling, 0 replies; 3+ messages in thread
From: Shuicheng Lin @ 2026-03-06 3:00 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 missed 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] 3+ messages in thread* [PATCH 2/2] drm/xe: Fix exec queue unwind on hw engine group add failure
2026-03-06 3:00 [PATCH 0/2] Fix error path of xe_exec_queue_create_ioctl() Shuicheng Lin
2026-03-06 3:00 ` [PATCH 1/2] drm/xe: Fix missing xe_hw_engine_group_del_exec_queue() in error path Shuicheng Lin
@ 2026-03-06 3:00 ` Shuicheng Lin
1 sibling, 0 replies; 3+ messages in thread
From: Shuicheng Lin @ 2026-03-06 3:00 UTC (permalink / raw)
To: intel-xe; +Cc: Shuicheng Lin, Matthew Brost, Niranjana Vishwanathapura
When xe_hw_engine_group_add_exec_queue() fails in
xe_exec_queue_create_ioctl(), to undo xe_exec_queue_group_add()
and xe_vm_add_compute_exec_queue(), the code should unwind through
kill_exec_queue rather than directly dropping the queue reference.
v2: correct the jump label. (Matt)
Fixes: d9ec63474648 ("drm/xe/multi_queue: Add user interface for multi queue support")
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Cc: 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, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index af915ccb4925..372fc17a2f46 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -1390,7 +1390,7 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
if (q->vm && q->hwe->hw_engine_group) {
err = xe_hw_engine_group_add_exec_queue(q->hwe->hw_engine_group, q);
if (err)
- goto put_exec_queue;
+ goto kill_exec_queue;
}
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-06 3:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 3:00 [PATCH 0/2] Fix error path of xe_exec_queue_create_ioctl() Shuicheng Lin
2026-03-06 3:00 ` [PATCH 1/2] drm/xe: Fix missing xe_hw_engine_group_del_exec_queue() in error path Shuicheng Lin
2026-03-06 3:00 ` [PATCH 2/2] drm/xe: Fix exec queue unwind on hw engine group add failure Shuicheng Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox