mirror_ubuntu-kernels/drivers/gpu/drm/amd/pm/powerplay
Alexey Kodanev d2bd0831b5 drm/amd/pm: smu7_hwmgr: fix potential off-by-one overflow in 'performance_levels'
Since 'hardwareActivityPerformanceLevels' is set to the size of the
'performance_levels' array in smu7_hwmgr_backend_init(), using the
'<=' assertion to check for the next index value is incorrect.
Replace it with '<'.

Detected using the static analysis tool - Svace.
Fixes: 599a7e9fe1 ("drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7.")
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-10-10 17:32:56 -04:00
..
hwmgr drm/amd/pm: smu7_hwmgr: fix potential off-by-one overflow in 'performance_levels' 2022-10-10 17:32:56 -04:00
inc drm/amd/pm: remove unused declarations in hardwaremanager.h 2022-09-13 14:52:36 -04:00
smumgr drm/amd/pm: Remove unneeded result variable 2022-09-20 12:42:46 -04:00
amd_powerplay.c drivers/amd/pm: check the return value of amdgpu_bo_kmap 2022-09-29 09:41:42 -04:00
Makefile drm/amd/pm: relocate the power related headers 2022-01-14 17:51:14 -05:00