Skip to content

Commit

Permalink
Merge tag 'drm-intel-fixes-2021-12-15' of ssh://git.freedesktop.org/g…
Browse files Browse the repository at this point in the history
…it/drm/drm-intel into drm-fixes

Fix a bound check in the DMC fw load.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/YbnGvnsX/H3rKAqO@intel.com
  • Loading branch information
Dave Airlie committed Dec 16, 2021
2 parents 2585cf9 + 53b3495 commit c9f0322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/display/intel_dmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ static void parse_dmc_fw(struct drm_i915_private *dev_priv,
continue;

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

0 comments on commit c9f0322

Please sign in to comment.