aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorZichen Xie <[email protected]>2024-10-23 09:51:47 -0500
committerStephen Boyd <[email protected]>2024-10-28 16:47:22 -0700
commit00f8f70a0e8c6601861628be26270a0b6f4bbb34 (patch)
tree47baf214f140a2abc78179a4527d66d057c6d1a4 /tools/perf/scripts/python/libxed.py
parentb961b659add795bb3315ef3afda300beab555f3f (diff)
clk: sophgo: avoid integer overflow in sg2042_pll_recalc_rate()
This was found by a static analyzer. There may be a potential integer overflow issue in sg2042_pll_recalc_rate(). numerator is defined as u64 while parent_rate is defined as unsigned long and ctrl_table.fbdiv is defined as unsigned int. On 32-bit machine, the result of the calculation will be limited to "u32" without correct casting. Integer overflow may occur on high-performance systems. Fixes: 48cf7e01386e ("clk: sophgo: Add SG2042 clock driver") Signed-off-by: Zichen Xie <[email protected]> Reviewed-by: Chen Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Dan Carpenter <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions