diff options
| author | Alex Hung <[email protected]> | 2023-01-11 16:54:11 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-02-28 19:29:35 +0000 |
| commit | b4ceeffd13870b641a284ffb0f6fb4ffe19b0b14 (patch) | |
| tree | 6fd827aaae9b9bd8948cf2c8047c0d9d1cd345a4 /drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h | |
| parent | drm/amd/display: Ext displays with dock can't recognized after resume (diff) | |
| download | kernel-b4ceeffd13870b641a284ffb0f6fb4ffe19b0b14.tar.gz kernel-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 <[email protected]>
Acked-by: Qingqing Zhuo <[email protected]>
Signed-off-by: Alex Hung <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h')
0 files changed, 0 insertions, 0 deletions
