]> 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 13:51:40 +0000 (09:51 -0400)
commit872399bd401ca0a6910b7d65af15b6f438bc5207
treeefae47f7865d28defdb003fb0f5fa246d291b4f9
parent417d4f4ca6fb4af4aa83febc8c1bb586c6876baf
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>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c