Re: [PATCH] drm/i915/selftests: avoid using uninitialized context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sebastian,

thanks for review.
> I don't thing it's a best idea to just initialize ww here, you still have
> incorrect path that try to fini ww before it was initialize.
Fair point - we still call i915_gem_ww_ctx_fini(), which is
useless without actual ww.

> 
> I would probably do something like this instead.
> ------------------------------------
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> index 5816d515203a..526518bc4dba 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
> @@ -167,8 +167,10 @@ static int igt_ppgtt_alloc(void *arg)
>         if (IS_ERR(ppgtt))
>                         return PTR_ERR(ppgtt);
> 
>                         -       if (!ppgtt->vm.allocate_va_range)
>                         -               goto err_ppgtt_cleanup;
>                         +       if (!ppgtt->vm.allocate_va_range) {
>                         +               i915_vm_put(&ppgtt->vm);
>                         +               return 0;
>                         +       }
> ------------------------------------
Ok, I'll put that into a v2 soon.

Krzysztof



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux