diff options
| author | Alex Hung <alex.hung@amd.com> | 2023-01-11 09:54:11 -0700 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2023-02-28 14:29:35 -0500 |
| commit | b4ceeffd13870b641a284ffb0f6fb4ffe19b0b14 (patch) | |
| tree | 6fd827aaae9b9bd8948cf2c8047c0d9d1cd345a4 /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 1e5d4d8eb8c0f15d90c50e7abd686c980e54e42e (diff) | |
| download | linux-b4ceeffd13870b641a284ffb0f6fb4ffe19b0b14.tar.gz linux-b4ceeffd13870b641a284ffb0f6fb4ffe19b0b14.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 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions
