]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Detect overflow in calculating dumb buffer size
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Jan 2020 12:59:34 +0000 (12:59 +0000)
committerJani Nikula <jani.nikula@intel.com>
Tue, 11 Feb 2020 09:49:45 +0000 (11:49 +0200)
commite19da25cd88a842f883f22609e5a2ba59e484790
treeb153b1681b30da7f3e831554a9d206266bb12067
parente90fa992463e8b5022071abe7b891b67c28297ea
drm/i915/gem: Detect overflow in calculating dumb buffer size

To multiply 2 u32 numbers to generate a u64 in C requires a bit of
forewarning for the compiler.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200123125934.1401755-1-chris@chris-wilson.co.uk
(cherry picked from commit 0f8f8a64300092852b9361cd835395ee71e6a7d6)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/i915_gem.c