(speed == 0)
> + if (!speed || speed > UINT_MAX/8)
> return -EINVAL;
> /*
> * To prevent from possible overheat, some ASICs may have requirement
> --
> 2.43.0
>
Hi Alex.
The patch 'drm/amd/pm/smu11: Prevent division by zero' wa
rn -EINVAL;
> > /*
> > * To prevent from possible overheat, some ASICs may have
> > requirement
> > --
> > 2.43.0
> >
>
> Hi Alex.
>
> The patch 'drm/amd/pm/smu11: Prevent division by zero' was sent
> separately, not part of the patch series, maybe that's why it wasn't
> accepted. Should I resend it?
>
> Regards, Denis.
>
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: 1e866f1fe528 ("drm/amd/pm: Prevent divide by zero")
Signed-off-by: Denis Arefev
---
drivers/gpu/drm/amd/pm/swsmu/smu11
On Thu, Mar 20, 2025 at 9:11 AM Denis Arefev wrote:
>
> 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: 1e866f1fe528 ("drm/amd/pm: Prevent divide by zero")
> Sign