commit f25db6cb2af08bf971eb0de308e980cf89ce518c Author: Pierre Willenbrock Date: Sat Oct 18 20:16:00 2008 +0200 Add guard against physical pages in high mem Signed-off-by: Pierre Willenbrock diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 9ac73dd..fcdb918 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1088,6 +1088,13 @@ i915_gem_object_get_page_list(struct drm_gem_object *obj) i915_gem_object_free_page_list(obj); return ret; } + if (page_to_phys(page) >> 32) { + DRM_ERROR("Found physical page address outside " + "of 32bit: %llx\n", page_to_phys(page)); + ret = -EINVAL; + i915_gem_object_free_page_list(obj); + return ret; + } obj_priv->page_list[i] = page; } return 0;