]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/xehp: Fix missing sentinel on mcr_ranges_xehp
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 30 Jul 2021 19:11:15 +0000 (12:11 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Sat, 31 Jul 2021 02:06:13 +0000 (19:06 -0700)
commit7db05dc8640a37da80fbbecdd894d1181682ebbc
tree7ce7a6a3ccdcad3a98342a104d3ce51733ed8177
parent133caa360b38ce8eee6c543c1fa74be586b7a886
drm/i915/xehp: Fix missing sentinel on mcr_ranges_xehp

There's a missing sentinel since we are not using ARRAY_SIZE(), but rather
checking that the .start is 0 to stop the iteration in mcr_range().

BUG: KASAN: global-out-of-bounds in mcr_range.isra.0+0x69/0xa0 [i915]
Read of size 4 at addr ffffffffa0889928 by task modprobe/3881

Fixes: 6944c6b223ec ("drm/i915/xehp: Define multicast register ranges")
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210730191115.11f6d13-1-lucas.demarchi@intel.com
drivers/gpu/drm/i915/gt/intel_workarounds.c