[PATCH] drm/xe: Fix loop in vm_bind_ioctl_ops_unwind
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Thu Feb 1 19:20:36 UTC 2024
Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
On 2024-02-01 18:55, Matthew Brost wrote:
> 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 at 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;
>
More information about the Intel-xe
mailing list