Skip to content

Commit

Permalink
drm/i915/xehp: Fix missing sentinel on mcr_ranges_xehp
Browse files Browse the repository at this point in the history
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: d8905ba ("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.2514581-1-lucas.demarchi@intel.com
  • Loading branch information
Lucas De Marchi committed Jul 31, 2021
1 parent 6d0e4f0 commit 3989de0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/gt/intel_workarounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -2000,6 +2000,7 @@ static const struct mcr_range mcr_ranges_xehp[] = {
{ .start = 0xdc00, .end = 0xffff },
{ .start = 0x17000, .end = 0x17fff },
{ .start = 0x24a00, .end = 0x24a7f },
{},
};

static bool mcr_range(struct drm_i915_private *i915, u32 offset)
Expand Down

0 comments on commit 3989de0

Please sign in to comment.