From: Dan Carpenter <dan.carpenter@oracle.com>
To: chris@chris-wilson.co.uk
Cc: intel-gfx@lists.freedesktop.org
Subject: [bug report] drm/i915: Fill different pages of the GTT
Date: Mon, 13 Mar 2017 12:28:01 +0300 [thread overview]
Message-ID: <20170313092801.GA5724@mwanda> (raw)
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
next reply other threads:[~2017-03-13 9:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 9:28 Dan Carpenter [this message]
2017-03-13 10:08 ` [bug report] drm/i915: Fill different pages of the GTT Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170313092801.GA5724@mwanda \
--to=dan.carpenter@oracle.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox