aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorAnson Jacob <[email protected]>2021-03-03 12:33:15 -0500
committerAlex Deucher <[email protected]>2021-03-23 23:00:57 -0400
commit50e2fc36e72d4ad672032ebf646cecb48656efe0 (patch)
tree71c4cea7ffa56520eadd17b42ab52510fec11613 /drivers/gpu/drm/amd/amdgpu/amdgpu.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 <[email protected]> Signed-off-by: Anson Jacob <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Tested-by: Lyude Paul <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
0 files changed, 0 insertions, 0 deletions