aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
diff options
context:
space:
mode:
authorAnson Jacob <Anson.Jacob@amd.com>2021-03-03 12:33:15 -0500
committerAlex Deucher <alexander.deucher@amd.com>2021-03-23 23:00:57 -0400
commit50e2fc36e72d4ad672032ebf646cecb48656efe0 (patch)
tree71c4cea7ffa56520eadd17b42ab52510fec11613 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
parent47bfa5f60fbfd7a1c5b4d5ba8c1ab45bc9c81bc8 (diff)
drm/amdkfd: Fix UBSAN shift-out-of-bounds warning
If get_num_sdma_queues or get_num_xgmi_sdma_queues is 0, we end up doing a shift operation where the number of bits shifted equals number of bits in the operand. This behaviour is undefined. Set num_sdma_queues or num_xgmi_sdma_queues to ULLONG_MAX, if the count is >= number of bits in the operand. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1472 Reported-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Anson Jacob <Anson.Jacob@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Tested-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h')
0 files changed, 0 insertions, 0 deletions