mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 15:33:28 +00:00
Shifting the 1 by exp by an int can lead to sign-extension overlow when exp is 31 since 1 is an signed int and sign-extending this result to an unsigned long long will set the upper 32 bits. Fix this by shifting an unsigned long. Detected by cppcheck: (warning) Shifting signed 32-bit value by 31 bits is undefined behaviour Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: David S. Miller <[email protected]>