]> www.infradead.org Git - users/hch/configfs.git/commit
drm/amd/display: Fix possible overflow in integer multiplication
authorAlex Hung <alex.hung@amd.com>
Sat, 8 Jun 2024 04:09:53 +0000 (22:09 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 27 Jul 2024 21:31:41 +0000 (17:31 -0400)
commit3f96f545f877ac59d0c967f52d760b4b2b3b9a47
tree5bc8191c962fd318ef747ef9bbe0f6355ca3f822
parentd5022deb4a526009fdc20e4d62528b25b05112dc
drm/amd/display: Fix possible overflow in integer multiplication

[WHAT & HOW]
Integer multiplies integer may overflow in context that expects an
expression of unsigned long long (64 bits). This can be fixed by casting
integer to unsigned long long to force 64 bits results.

This fixes 2 OVERFLOW_BEFORE_WIDEN issues reported by Coverity.

Signed-off-by: Alex Hung <alex.hung@amd.com>
Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c