* [bug report] drm/i915: Fill different pages of the GTT
@ 2017-03-13 9:28 Dan Carpenter
2017-03-13 10:08 ` Chris Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-03-13 9:28 UTC (permalink / raw)
To: chris; +Cc: intel-gfx
Hello Chris Wilson,
The patch 6e32ab3d4777: "drm/i915: Fill different pages of the GTT"
from Feb 13, 2017, leads to the following static checker warning:
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:583 walk_hole()
error: 'vma' dereferencing possible ERR_PTR()
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
539 vma = i915_vma_instance(obj, vm, NULL);
540 if (IS_ERR(vma)) {
^^^^^^^^^^
541 err = PTR_ERR(vma);
542 goto err;
^^^^^^^^^
543 }
544
545 for (addr = hole_start;
546 addr + obj->base.size < hole_end;
547 addr += obj->base.size) {
548 err = i915_vma_pin(vma, 0, 0, addr | flags);
549 if (err) {
550 pr_err("%s bind failed at %llx + %llx [hole %llx- %llx] with err=%d\n",
551 __func__, addr, vma->size,
552 hole_start, hole_end, err);
553 goto err;
554 }
555 i915_vma_unpin(vma);
556
557 if (!drm_mm_node_allocated(&vma->node) ||
558 i915_vma_misplaced(vma, 0, 0, addr | flags)) {
559 pr_err("%s incorrect at %llx + %llx\n",
560 __func__, addr, vma->size);
561 err = -EINVAL;
562 goto err;
563 }
564
565 err = i915_vma_unbind(vma);
566 if (err) {
567 pr_err("%s unbind failed at %llx + %llx with err=%d\n",
568 __func__, addr, vma->size, err);
569 goto err;
570 }
571
572 GEM_BUG_ON(drm_mm_node_allocated(&vma->node));
573
574 if (igt_timeout(end_time,
575 "%s timed out at %llx\n",
576 __func__, addr)) {
577 err = -EINTR;
578 goto err;
579 }
580 }
581
582 err:
583 if (!i915_vma_is_ggtt(vma))
^^^^^^^^^^^^^^^^^^^^^
Dereferenced inside function call.
regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] drm/i915: Fill different pages of the GTT
2017-03-13 9:28 [bug report] drm/i915: Fill different pages of the GTT Dan Carpenter
@ 2017-03-13 10:08 ` Chris Wilson
0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2017-03-13 10:08 UTC (permalink / raw)
To: Dan Carpenter; +Cc: intel-gfx
On Mon, Mar 13, 2017 at 12:28:01PM +0300, Dan Carpenter wrote:
> Hello Chris Wilson,
>
> The patch 6e32ab3d4777: "drm/i915: Fill different pages of the GTT"
> from Feb 13, 2017, leads to the following static checker warning:
>
> drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:583 walk_hole()
> error: 'vma' dereferencing possible ERR_PTR()
Thanks,
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-13 10:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-13 9:28 [bug report] drm/i915: Fill different pages of the GTT Dan Carpenter
2017-03-13 10:08 ` Chris Wilson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.