diff options
author | 2023-01-11 09:54:11 -0700 | |
---|---|---|
committer | 2023-03-01 22:43:19 -0500 | |
commit | 031f196d1b1b6d5dfcb0533b431e3ab1750e6189 (patch) | |
tree | 6597cb76323e6cddb0cc2d6328febeefe428ee4f /scripts/generate_rust_analyzer.py | |
parent | drm/amd/display: Ext displays with dock can't recognized after resume (diff) | |
download | linux-rng-031f196d1b1b6d5dfcb0533b431e3ab1750e6189.tar.xz linux-rng-031f196d1b1b6d5dfcb0533b431e3ab1750e6189.zip |
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 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions