diff options
author | Alex Hung <alex.hung@amd.com> | 2023-01-11 19:54:11 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-03-02 06:43:19 +0300 |
commit | 031f196d1b1b6d5dfcb0533b431e3ab1750e6189 (patch) | |
tree | 6597cb76323e6cddb0cc2d6328febeefe428ee4f /drivers/gpio | |
parent | 01a18aa309aec12461fb5e6aecb76f8b33810658 (diff) | |
download | linux-031f196d1b1b6d5dfcb0533b431e3ab1750e6189.tar.xz |
drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes
[WHY]
When PTEBufferSizeInRequests is zero, UBSAN reports the following
warning because dml_log2 returns an unexpected negative value:
shift exponent 4294966273 is too large for 32-bit type 'int'
[HOW]
In the case PTEBufferSizeInRequests is zero, skip the dml_log2() and
assign the result directly.
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@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>
Diffstat (limited to 'drivers/gpio')
0 files changed, 0 insertions, 0 deletions