Searched hist:ea37096a (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/cpufreq/ |
H A D | scmi-cpufreq.c | ea37096a Mon May 20 01:37:32 CDT 2024 Jagadeesh Kona <quic_jkona@quicinc.com> cpufreq: scmi: Avoid overflow of target_freq in fast switch
[ Upstream commit 074cffb5020ddcaa5fafcc55655e5da6ebe8c831 ]
Conversion of target_freq to HZ in scmi_cpufreq_fast_switch() can lead to overflow if the multiplied result is greater than UINT_MAX, since type of target_freq is unsigned int. Avoid this overflow by assigning target_freq to unsigned long variable for converting it to HZ.
Signed-off-by: Jagadeesh Kona <quic_jkona@quicinc.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
|