]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm/powerplay/hwmgr/smu7_thermal: Prevent division by zero
authorDenis Arefev <arefev@swemel.ru>
Fri, 21 Mar 2025 11:08:16 +0000 (14:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:47:59 +0000 (10:47 +0200)
commit8e9c4f8d197d5709c75effa5d58e80b4fa01981a
tree9e1a20b5f7c56fc755400282e5d9b571da195143
parent63a150400194592206817124268ff6f43947e8c9
drm/amd/pm/powerplay/hwmgr/smu7_thermal: Prevent division by zero

commit 7c246a05df51c52fe0852ce56ba10c41e6ed1f39 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: c52dcf49195d ("drm/amd/pp: Avoid divide-by-zero in fan_ctrl_set_fan_speed_rpm")
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/powerplay/hwmgr/smu7_thermal.c