All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Fix error path for ggtt walk_hole()
@ 2017-03-13 10:07 Chris Wilson
  2017-03-13 10:33 ` Matthew Auld
  2017-03-13 11:17 ` ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2017-03-13 10:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala, drm-intel-fixes, Matthew Auld

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()

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 6e32ab3d4777 ("drm/i915: Fill different pages of the GTT"
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: <drm-intel-fixes@lists.freedesktop.org>
---
 drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index 8aad2e587fce..f75b9097a640 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -539,7 +539,7 @@ static int walk_hole(struct drm_i915_private *i915,
 		vma = i915_vma_instance(obj, vm, NULL);
 		if (IS_ERR(vma)) {
 			err = PTR_ERR(vma);
-			goto err;
+			goto err_put;
 		}
 
 		for (addr = hole_start;
@@ -550,7 +550,7 @@ static int walk_hole(struct drm_i915_private *i915,
 				pr_err("%s bind failed at %llx + %llx [hole %llx- %llx] with err=%d\n",
 				       __func__, addr, vma->size,
 				       hole_start, hole_end, err);
-				goto err;
+				goto err_close;
 			}
 			i915_vma_unpin(vma);
 
@@ -559,14 +559,14 @@ static int walk_hole(struct drm_i915_private *i915,
 				pr_err("%s incorrect at %llx + %llx\n",
 				       __func__, addr, vma->size);
 				err = -EINVAL;
-				goto err;
+				goto err_close;
 			}
 
 			err = i915_vma_unbind(vma);
 			if (err) {
 				pr_err("%s unbind failed at %llx + %llx  with err=%d\n",
 				       __func__, addr, vma->size, err);
-				goto err;
+				goto err_close;
 			}
 
 			GEM_BUG_ON(drm_mm_node_allocated(&vma->node));
@@ -575,13 +575,14 @@ static int walk_hole(struct drm_i915_private *i915,
 					"%s timed out at %llx\n",
 					__func__, addr)) {
 				err = -EINTR;
-				goto err;
+				goto err_close;
 			}
 		}
 
-err:
+err_close:
 		if (!i915_vma_is_ggtt(vma))
 			i915_vma_close(vma);
+err_put:
 		i915_gem_object_put(obj);
 		if (err)
 			return err;
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915/selftests: Fix error path for ggtt walk_hole()
  2017-03-13 10:07 [PATCH] drm/i915/selftests: Fix error path for ggtt walk_hole() Chris Wilson
@ 2017-03-13 10:33 ` Matthew Auld
  2017-03-13 14:29   ` Chris Wilson
  2017-03-13 11:17 ` ✓ Fi.CI.BAT: success for " Patchwork
  1 sibling, 1 reply; 4+ messages in thread
From: Matthew Auld @ 2017-03-13 10:33 UTC (permalink / raw)
  To: Chris Wilson
  Cc: Intel Graphics Development, drm-intel-fixes, Matthew Auld, Mika Kuoppala

On 13 March 2017 at 10:07, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 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()
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 6e32ab3d4777 ("drm/i915: Fill different pages of the GTT"
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Matthew Auld <matthew.auld@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: <drm-intel-fixes@lists.freedesktop.org>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915/selftests: Fix error path for ggtt walk_hole()
  2017-03-13 10:07 [PATCH] drm/i915/selftests: Fix error path for ggtt walk_hole() Chris Wilson
  2017-03-13 10:33 ` Matthew Auld
@ 2017-03-13 11:17 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-03-13 11:17 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/selftests: Fix error path for ggtt walk_hole()
URL   : https://patchwork.freedesktop.org/series/21140/
State : success

== Summary ==

Series 21140v1 drm/i915/selftests: Fix error path for ggtt walk_hole()
https://patchwork.freedesktop.org/api/1.0/series/21140/revisions/1/mbox/

Test gem_exec_fence:
        Subgroup await-hang-default:
                incomplete -> PASS       (fi-hsw-4770) fdo#99726

fdo#99726 https://bugs.freedesktop.org/show_bug.cgi?id=99726

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time: 456s
fi-bsw-n3050     total:278  pass:239  dwarn:0   dfail:0   fail:0   skip:39  time: 608s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time: 530s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time: 586s
fi-byt-j1900     total:278  pass:251  dwarn:0   dfail:0   fail:0   skip:27  time: 504s
fi-byt-n2820     total:278  pass:247  dwarn:0   dfail:0   fail:0   skip:31  time: 512s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 433s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time: 434s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time: 446s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 514s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time: 492s
fi-kbl-7500u     total:278  pass:259  dwarn:1   dfail:0   fail:0   skip:18  time: 472s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 510s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time: 596s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time: 496s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time: 544s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time: 543s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time: 406s

a1d165d30907f365027c6f6e790d582157e9eeae drm-tip: 2017y-03m-13d-10h-01m-31s UTC integration manifest
25dd56f drm/i915/selftests: Fix error path for ggtt walk_hole()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4151/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915/selftests: Fix error path for ggtt walk_hole()
  2017-03-13 10:33 ` Matthew Auld
@ 2017-03-13 14:29   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2017-03-13 14:29 UTC (permalink / raw)
  To: Matthew Auld
  Cc: Intel Graphics Development, drm-intel-fixes, Matthew Auld, Mika Kuoppala

On Mon, Mar 13, 2017 at 10:33:35AM +0000, Matthew Auld wrote:
> On 13 March 2017 at 10:07, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > 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()
> >
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Fixes: 6e32ab3d4777 ("drm/i915: Fill different pages of the GTT"
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Matthew Auld <matthew.auld@intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> > Cc: <drm-intel-fixes@lists.freedesktop.org>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>

Pushed, 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] 4+ messages in thread

end of thread, other threads:[~2017-03-13 14:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 10:07 [PATCH] drm/i915/selftests: Fix error path for ggtt walk_hole() Chris Wilson
2017-03-13 10:33 ` Matthew Auld
2017-03-13 14:29   ` Chris Wilson
2017-03-13 11:17 ` ✓ Fi.CI.BAT: success for " Patchwork

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.