summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorSurendra Singh Chouhan <kr494167@gmail.com>2026-07-24 10:18:54 +0530
committerUwe Kleine-König <ukleinek@kernel.org>2026-09-07 11:37:08 +0200
commita662d944da1e9236a99355aa3e8a93735d8b3521 (patch)
treeba51795cd7a69e0d304f1b1bfdb78b0913f9897c /scripts/Makefile.thinlto
parent0de9b836a3bc1cd30578ae2c4463d09afd85ed3d (diff)
downloadlinux-next-a662d944da1e9236a99355aa3e8a93735d8b3521.tar.gz
linux-next-a662d944da1e9236a99355aa3e8a93735d8b3521.zip
pwm: ipq: Prevent potential 32-bit integer overflow in hi_div calculation
In ipq_pwm_get_state(), hi_div was calculated as: hi_div = hi_dur * (pre_div + 1); hi_dur and (pre_div + 1) are both unsigned int (32-bit) values. Evaluating their multiplication using 32-bit arithmetic before assigning to the 64-bit u64 hi_div variable can overflow 32-bit unsigned math. While effective_div explicitly uses (u64)(pwm_div + 1) * (pre_div + 1) to prevent overflow, hi_div was missing the (u64) cast. Fix this by casting hi_dur to (u64) before multiplication, matching the precision used for effective_div. Fixes: c436e3e9c265 ("pwm: Driver for qualcomm ipq6018 pwm block") Signed-off-by: Surendra Singh Chouhan <kr494167@gmail.com> Link: https://patch.msgid.link/20260724044854.33274-1-kr494167@gmail.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions