aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi/mpi-cmp.c
diff options
context:
space:
mode:
authorAnkit Nautiyal <[email protected]>2025-06-18 13:09:50 +0000
committerJoonas Lahtinen <[email protected]>2025-06-23 11:59:55 +0000
commit9205999e9f13a07cb29d5a8836c25afdca186007 (patch)
treeb9ce6bf85c1222dd21bb0b038b2ff7b8175223cc /lib/crypto/mpi/mpi-cmp.c
parentLinux 6.16-rc3 (diff)
downloadkernel-9205999e9f13a07cb29d5a8836c25afdca186007.tar.gz
kernel-9205999e9f13a07cb29d5a8836c25afdca186007.zip
drm/i915/snps_hdmi_pll: Fix 64-bit divisor truncation by using div64_u64
DIV_ROUND_CLOSEST_ULL uses do_div(), which expects a 32-bit divisor. When passing a 64-bit constant like CURVE2_MULTIPLIER, the value is silently truncated to u32, potentially leading to incorrect results on large divisors. Replace DIV_ROUND_CLOSEST_ULL with DIV64_U64_ROUND_CLOSEST which correctly handles full 64-bit division. v2: Use DIV64_U64_ROUND_CLOSEST instead of div64_u64 macro. (Jani) Fixes: 5947642004bf ("drm/i915/display: Add support for SNPS PHY HDMI PLL algorithm for DG2") Reported-by: Vas Novikov <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Cc: Ankit Nautiyal <[email protected]> Cc: Suraj Kandpal <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Vas Novikov <[email protected]> Cc: [email protected] # v6.15+ Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Ankit Nautiyal <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit b300a175a11e6a934d728317dc39787723cc7917) Signed-off-by: Joonas Lahtinen <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions