]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/amd/display: Ensure index calculation will not overflow
authorAlex Hung <alex.hung@amd.com>
Wed, 24 Apr 2024 23:08:04 +0000 (17:08 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 20:18:18 +0000 (16:18 -0400)
commit8e2734bf444767fed787305ccdcb36a2be5301a2
treedb8ce61541b0ccd867bdd813f8ab163d7d4a8130
parentecda00059b14b95a5b84f3efc1c1f341e1fd7dbc
drm/amd/display: Ensure index calculation will not overflow

[WHY & HOW]
Make sure vmid0p72_idx, vnom0p8_idx and vmax0p9_idx calculation will
never overflow and exceess array size.

This fixes 3 OVERRUN and 1 INTEGER_OVERFLOW issues reported by Coverity.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c