Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6b9f9b99 authored by Denis Arefev's avatar Denis Arefev Committed by Greg Kroah-Hartman
Browse files

drm/amd/pm: Prevent division by zero



[ Upstream commit 4e3d9508c056d7e0a56b58d5c81253e2a0d22b6c ]

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: 031db090 ("drm/amd/powerplay/vega20: enable fan RPM and pwm settings V2")
Signed-off-by: default avatarDenis Arefev <arefev@swemel.ru>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ce5af106
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment