Skip to content
Commit 7381e27b authored by Georgi Djakov's avatar Georgi Djakov
Browse files

interconnect: qcom: msm8974: Prevent integer overflow in rate



When sync_state support got introduced recently, by default we try to
set the NoCs to run initially at maximum rate. But as these values are
aggregated, we may end with a really big clock rate value, which is
then converted from "u64" to "long" during the clock rate rounding.
But on 32bit platforms this may result an overflow. Fix it by making
sure that the rate is within range.

Reported-by: default avatarLuca Weiss <luca@z3ntu.xyz>
Reviewed-by: default avatarBrian Masney <masneyb@onstation.org>
Link: https://lore.kernel.org/r/20201106144847.7726-1-georgi.djakov@linaro.org


Signed-off-by: default avatarGeorgi Djakov <georgi.djakov@linaro.org>
parent 3cea11cd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment