Re: [PATCH 5.10.y] arm64: topology: fix possible overflow in amu_fie_setup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 16, 2022 at 11:21:38PM +0300, Sergey Shtylyov wrote:
> Commit d4955c0ad77dbc684fc716387070ac24801b8bca upstream.
> 
> 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.
> 
> Fixes: cd0ed03a8903 ("arm64: use activity monitors for frequency invariance")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@xxxxxx>
> Link: https://lore.kernel.org/r/01493d64-2bce-d968-86dc-11a122a9c07d@xxxxxx
> Signed-off-by: Will Deacon <will@xxxxxxxxxx>

Now queued up, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux