All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: i915_pages_create_for_stolen should return err ptr
@ 2016-11-18 17:02 Matthew Auld
  2016-11-18 17:08 ` Chris Wilson
  2016-11-18 17:46 ` ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew Auld @ 2016-11-18 17:02 UTC (permalink / raw)
  To: intel-gfx

When gathering the pages from our backing storage we expect get_pages()
to either give us our sg_table or an err ptr. However when gathering our
fake pages for stolen memory we may return NULL in the event of a
failure. To prevent any funny business we should therefore return the
proper err ptr value.

Fixes: 03ac84f1830e ("drm/i915: Pass around sg_table to get_pages/put_pages backend")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_stolen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
index 5bc9f699fdd2..ebaa941c83af 100644
--- a/drivers/gpu/drm/i915/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
@@ -525,11 +525,11 @@ i915_pages_create_for_stolen(struct drm_device *dev,
 
 	st = kmalloc(sizeof(*st), GFP_KERNEL);
 	if (st == NULL)
-		return NULL;
+		return ERR_PTR(-ENOMEM);
 
 	if (sg_alloc_table(st, 1, GFP_KERNEL)) {
 		kfree(st);
-		return NULL;
+		return ERR_PTR(-ENOMEM);
 	}
 
 	sg = st->sgl;
-- 
2.7.4

_______________________________________________
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: i915_pages_create_for_stolen should return err ptr
  2016-11-18 17:02 [PATCH] drm/i915: i915_pages_create_for_stolen should return err ptr Matthew Auld
@ 2016-11-18 17:08 ` Chris Wilson
  2016-11-18 20:54   ` Chris Wilson
  2016-11-18 17:46 ` ✓ Fi.CI.BAT: success for " Patchwork
  1 sibling, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2016-11-18 17:08 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

On Fri, Nov 18, 2016 at 05:02:16PM +0000, Matthew Auld wrote:
> When gathering the pages from our backing storage we expect get_pages()
> to either give us our sg_table or an err ptr. However when gathering our
> fake pages for stolen memory we may return NULL in the event of a
> failure. To prevent any funny business we should therefore return the
> proper err ptr value.
> 
> Fixes: 03ac84f1830e ("drm/i915: Pass around sg_table to get_pages/put_pages backend")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Please have a look at https://patchwork.freedesktop.org/series/15267/
-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

* ✓ Fi.CI.BAT: success for drm/i915: i915_pages_create_for_stolen should return err ptr
  2016-11-18 17:02 [PATCH] drm/i915: i915_pages_create_for_stolen should return err ptr Matthew Auld
  2016-11-18 17:08 ` Chris Wilson
@ 2016-11-18 17:46 ` Patchwork
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2016-11-18 17:46 UTC (permalink / raw)
  To: Matthew Auld; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: i915_pages_create_for_stolen should return err ptr
URL   : https://patchwork.freedesktop.org/series/15563/
State : success

== Summary ==

Series 15563v1 drm/i915: i915_pages_create_for_stolen should return err ptr
https://patchwork.freedesktop.org/api/1.0/series/15563/revisions/1/mbox/


fi-bdw-5557u     total:244  pass:229  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:204  dwarn:0   dfail:0   fail:0   skip:40 
fi-bxt-t5700     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-j1900     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20 
fi-ilk-650       total:244  pass:191  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-7200u     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:223  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14 
fi-snb-2520m     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32 
fi-snb-2600      total:244  pass:211  dwarn:0   dfail:0   fail:0   skip:33 

05104adb7446f310fad4e36f22d4c84ffafa31fc drm-intel-nightly: 2016y-11m-18d-13h-10m-16s UTC integration manifest
5342ae0 drm/i915: i915_pages_create_for_stolen should return err ptr

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3059/
_______________________________________________
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: i915_pages_create_for_stolen should return err ptr
  2016-11-18 17:08 ` Chris Wilson
@ 2016-11-18 20:54   ` Chris Wilson
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2016-11-18 20:54 UTC (permalink / raw)
  To: Matthew Auld, intel-gfx

On Fri, Nov 18, 2016 at 05:08:55PM +0000, Chris Wilson wrote:
> On Fri, Nov 18, 2016 at 05:02:16PM +0000, Matthew Auld wrote:
> > When gathering the pages from our backing storage we expect get_pages()
> > to either give us our sg_table or an err ptr. However when gathering our
> > fake pages for stolen memory we may return NULL in the event of a
> > failure. To prevent any funny business we should therefore return the
> > proper err ptr value.
> > 
> > Fixes: 03ac84f1830e ("drm/i915: Pass around sg_table to get_pages/put_pages backend")
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

And pushed, thanks for the patch.
-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:[~2016-11-18 20:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-18 17:02 [PATCH] drm/i915: i915_pages_create_for_stolen should return err ptr Matthew Auld
2016-11-18 17:08 ` Chris Wilson
2016-11-18 20:54   ` Chris Wilson
2016-11-18 17:46 ` ✓ 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.