public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Assert internal objects are page aligned
@ 2017-01-16 14:52 Chris Wilson
  2017-01-16 15:24 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-01-17  7:33 ` [PATCH] " Joonas Lahtinen
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2017-01-16 14:52 UTC (permalink / raw)
  To: intel-gfx

Internal objects must be passed a page-aligned size. Check it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_internal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_internal.c b/drivers/gpu/drm/i915/i915_gem_internal.c
index 9b39472396ef..17ce53d0d092 100644
--- a/drivers/gpu/drm/i915/i915_gem_internal.c
+++ b/drivers/gpu/drm/i915/i915_gem_internal.c
@@ -156,6 +156,7 @@ i915_gem_object_create_internal(struct drm_i915_private *i915,
 	struct drm_i915_gem_object *obj;
 
 	GEM_BUG_ON(!size);
+	GEM_BUG_ON(!IS_ALIGNED(size, PAGE_SIZE));
 
 	if (overflows_type(size, obj->base.size))
 		return ERR_PTR(-E2BIG);
-- 
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] 3+ messages in thread

end of thread, other threads:[~2017-01-17  7:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-16 14:52 [PATCH] drm/i915: Assert internal objects are page aligned Chris Wilson
2017-01-16 15:24 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-01-17  7:33 ` [PATCH] " Joonas Lahtinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox