[PATCH] arm64: topology: fix possible overflow in amu_fie_setup()

Will Deacon will at kernel.org
Thu Sep 22 05:45:40 PDT 2022


On Fri, 16 Sep 2022 23:17:07 +0300, Sergey Shtylyov wrote:
> cpufreq_get_hw_max_freq() returns max frequency in kHz as *unsigned int*,
> while freq_inv_set_max_ratio() gets passed this frequency in Hz as 'u64'.
> Multiplying max frequency by 1000 can potentially result in overflow --
> multiplying by 1000ULL instead should avoid that...
> 
> Found by Linux Verification Center (linuxtesting.org) with the SVACE static
> analysis tool.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: topology: fix possible overflow in amu_fie_setup()
      https://git.kernel.org/arm64/c/d4955c0ad77d

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list