]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Avoid reading audio pattern past AUDIO_CHANNELS_COUNT
authorHarry Wentland <harry.wentland@amd.com>
Tue, 19 Apr 2022 17:03:12 +0000 (13:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 May 2022 16:21:41 +0000 (12:21 -0400)
commitd80ee1108d5e7f05ab5a0a016186f3e2a99af4c0
tree7d85235b7042fd3d3281121d7cecf8f1b2b63a68
parentff1d8318fd79d2926fe4a443d76612846e123b2a
drm/amd/display: Avoid reading audio pattern past AUDIO_CHANNELS_COUNT

A faulty receiver might report an erroneous channel count. We
should guard against reading beyond AUDIO_CHANNELS_COUNT as
that would overflow the dpcd_pattern_period array.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c