]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Avoid overflow in computing pot_hole loop termination
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 14 Feb 2017 09:23:44 +0000 (09:23 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 14 Feb 2017 22:30:20 +0000 (22:30 +0000)
commitd72fb157524db31d984bc3ab95240c450738e5ca
treebe71a931e05e3bb7a0de333adfd8e15f62269db6
parente7376c4f25575ed22d3d124461a4dbaf6ddf27e1
drm/i915: Avoid overflow in computing pot_hole loop termination

When using the mock_ppgtt selftest, the GTT is large enough to cause an
overflow in pot_hole() when adding 2 pages to the address. Avoid the
overflow by computing the final valid address and iterating up to that
address.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170214092344.12330-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c