]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm: Prevent division by zero
authorDenis Arefev <arefev@swemel.ru>
Fri, 21 Mar 2025 10:52:32 +0000 (13:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:14 +0000 (07:44 +0200)
commitb7c41df4913789ebfe73cc1e17c6401d4c5eab69
treeb75d8746eccf5b4daf6ecf1c01b90ab3b96f3b95
parentc177517ea65c728c55d55aa4abaee08a3b932210
drm/amd/pm: Prevent division by zero

commit 7d641c2b83275d3b0424127b2e0d2d0f7dd82aef upstream.

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: b64625a303de ("drm/amd/pm: correct the address of Arcturus fan related registers")
Signed-off-by: Denis Arefev <arefev@swemel.ru>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c