Skip to content

drm/amd/pm: Prevent division by zero

Denis Arefev amd-gfx dri-devel lkml 1 version Applied

Status from this message: Applied the series. Thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5drm/amd/pm: Prevent division by zerodrivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c+1 -10 replies
2/5drm/amd/pm: Prevent division by zerodrivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c+3 -00 replies
3/5drm/amd/pm: Prevent division by zerodrivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c+1 -10 replies
4/5drm/amd/pm: Prevent division by zerodrivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c+2 -20 replies
5/5drm/amd/pm: Prevent division by zerodrivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] drm/amd/pm: Prevent division by zero

This series of patches prevents possible 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.

Denis Arefev (5):
drm/amd/pm: Prevent division by zero
drm/amd/pm: Prevent division by zero
drm/amd/pm: Prevent division by zero
drm/amd/pm: Prevent division by zero
drm/amd/pm: Prevent division by zero

 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_thermal.c   | 6 +++---
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_thermal.c | 4 ++--
 drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c | 2 +-
 drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c       | 3 +++
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c          | 2 +-
 5 files changed, 10 insertions(+), 7 deletions(-)

I did not change these files, because the functions you are interested in are not used there for a long time. drivers/gpu/drm/radeon/si_dpm.c drivers/gpu/drm/radeon/ci_dpm.c

Signature · 1 line
2.43.0