[Intel-gfx] [PATCH] drm/i915: Remove user-triggerable WARN from i915_gem_object_create
Tvrtko Ursulin
tursulin at ursulin.net
Thu Mar 30 16:31:30 UTC 2017
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Since this can be triggered by simply attempting a huge object,
a WARN_ON is not appropriate.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 2709be922512..c4aba2faf342 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4166,7 +4166,7 @@ i915_gem_object_create(struct drm_i915_private *dev_priv, u64 size)
* catch if we ever need to fix it. In the meantime, if you do spot
* such a local variable, please consider fixing!
*/
- if (WARN_ON(size >> PAGE_SHIFT > INT_MAX))
+ if (size >> PAGE_SHIFT > INT_MAX)
return ERR_PTR(-E2BIG);
if (overflows_type(size, obj->base.size))
--
2.9.3
More information about the Intel-gfx
mailing list