diff options
author | Matthew Brost <matthew.brost@intel.com> | 2024-02-01 20:55:32 +0300 |
---|---|---|
committer | Matthew Brost <matthew.brost@intel.com> | 2024-02-02 05:42:39 +0300 |
commit | 3acc1ff1a72fce00cdbd3ef1c27108a967fd5616 (patch) | |
tree | fc9ff310ea160fa5ce0bc7f81e3bbe93d6446d48 /drivers/gpu/drm/xe/xe_vm.c | |
parent | d6beadc8d7326adf4fb6e62bb0453b17b93816c7 (diff) | |
download | linux-3acc1ff1a72fce00cdbd3ef1c27108a967fd5616.tar.xz |
drm/xe: Fix loop in vm_bind_ioctl_ops_unwind
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>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240201175532.2303168-1-matthew.brost@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_vm.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c index c107f7f414d8..9c1c68a2fff7 100644 --- a/drivers/gpu/drm/xe/xe_vm.c +++ b/drivers/gpu/drm/xe/xe_vm.c @@ -2669,7 +2669,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; |