]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amd/pm: Prevent division by zero
authorDenis Arefev <arefev@swemel.ru>
Fri, 21 Mar 2025 10:52:31 +0000 (13:52 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 26 Mar 2025 21:41:03 +0000 (17:41 -0400)
commitf23e9116ebb71b63fe9cec0dcac792aa9af30b0c
treeb37da3848ad16007c93976aab86263c3afea19ac
parentcf05922d63e2ae6a9b1b52ff5236a44c3b29f78c
drm/amd/pm: Prevent division by zero

The user can set any speed value.
If speed is greater than UINT_MAX/8, division by zero is possible.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: c05d1c401572 ("drm/amd/swsmu: add aldebaran smu13 ip support (v3)")
Signed-off-by: Denis Arefev <arefev@swemel.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c