]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix 32b overflow check in gen8_ppgtt_alloc_page_directories
authorMichel Thierry <michel.thierry@intel.com>
Thu, 30 Apr 2015 15:06:51 +0000 (16:06 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 May 2015 11:03:30 +0000 (13:03 +0200)
commit322307a28311d07762d8c6a69be8ec29034b1c02
tree8036cf2718b09559c27bc6ddcc62959a08394917
parentb3e8a62836e2de71639764f2164850b030cd3168
drm/i915: Fix 32b overflow check in gen8_ppgtt_alloc_page_directories

The patch 56f1ad7ad61e1d2bf48ec7311ba6c47a0fb8c0a1: "drm/i915/gen8:
page directories rework allocation" added an overflow warning, but the
mask had an extra 0. Use less typo-prone option suggested by Dave
instead, to check for (start + length) >= 0x100000000ULL.

This check will be unnecessary after gen8_alloc_va_range handles more
than 4 PDPs (48b addressing).

v2: Really check for 32b overflow (Ville)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dave Gordon <david.s.gordon@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.c