summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorZichen Xie <zichenxie0106@gmail.com>2024-10-23 17:51:47 +0300
committerStephen Boyd <sboyd@kernel.org>2024-10-29 02:47:22 +0300
commit00f8f70a0e8c6601861628be26270a0b6f4bbb34 (patch)
tree47baf214f140a2abc78179a4527d66d057c6d1a4 /tools/perf/scripts/python/task-analyzer.py
parentb961b659add795bb3315ef3afda300beab555f3f (diff)
downloadlinux-00f8f70a0e8c6601861628be26270a0b6f4bbb34.tar.xz
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 <zichenxie0106@gmail.com> Reviewed-by: Chen Wang <unicorn_wang@outlook.com> Link: https://lore.kernel.org/r/20241023145146.13130-1-zichenxie0106@gmail.com Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions