Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Fix loop in vm_bind_ioctl_ops_unwind
@ 2024-02-01 17:55 Matthew Brost
  2024-02-01 19:07 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Matthew Brost @ 2024-02-01 17:55 UTC (permalink / raw)
  To: intel-xe; +Cc: Matthew Brost

The logic for the unwind loop is incorrect resulting in an infinite
loop. Fix to unwind to go from the last operations list to he first.

Fixes: 617eebb9c480 ("drm/xe: Fix array of binds")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 2ab863fe7d0a..3b145a9c70d5 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -2657,7 +2657,7 @@ static void vm_bind_ioctl_ops_unwind(struct xe_vm *vm,
 {
 	int i;
 
-	for (i = num_ops_list - 1; i; ++i) {
+	for (i = num_ops_list - 1; i >= 0; --i) {
 		struct drm_gpuva_ops *__ops = ops[i];
 		struct drm_gpuva_op *__op;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-01 19:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-01 17:55 [PATCH] drm/xe: Fix loop in vm_bind_ioctl_ops_unwind Matthew Brost
2024-02-01 19:07 ` ✓ CI.Patch_applied: success for " Patchwork
2024-02-01 19:07 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-01 19:08 ` ✓ CI.KUnit: success " Patchwork
2024-02-01 19:16 ` ✓ CI.Build: " Patchwork
2024-02-01 19:16 ` ✓ CI.Hooks: " Patchwork
2024-02-01 19:17 ` ✓ CI.checksparse: " Patchwork
2024-02-01 19:20 ` [PATCH] " Maarten Lankhorst
2024-02-01 19:41 ` ✓ CI.BAT: success for " Patchwork

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