Skip to content

Commit c9f0322

Browse files
committed
Merge tag 'drm-intel-fixes-2021-12-15' of ssh://git.freedesktop.org/git/drm/drm-intel into drm-fixes
Fix a bound check in the DMC fw load. Signed-off-by: Dave Airlie <[email protected]> From: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/YbnGvnsX/[email protected]
2 parents 2585cf9 + 53b3495 commit c9f0322

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/display/intel_dmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ static void parse_dmc_fw(struct drm_i915_private *dev_priv,
596596
continue;
597597

598598
offset = readcount + dmc->dmc_info[id].dmc_offset * 4;
599-
if (fw->size - offset < 0) {
599+
if (offset > fw->size) {
600600
drm_err(&dev_priv->drm, "Reading beyond the fw_size\n");
601601
continue;
602602
}

0 commit comments

Comments
 (0)