]> 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, 25 Apr 2025 08:43:57 +0000 (10:43 +0200)
commit402964994e8ece29702383b234fabcf04791ff95
tree684b67ce57cbe9850f79955eabb3ed9ec7ebf377
parentc81299753466e2b3a8cd17c3e8213cdd5b7e2bdd
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