aboutsummaryrefslogtreecommitdiff
path: root/lib/assoc_array.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <[email protected]>2019-03-07 16:28:18 -0800
committerLinus Torvalds <[email protected]>2019-03-07 18:32:00 -0800
commitcdc94a37493135e355dfc0b0e086d84e3eadb50d (patch)
tree6ef3fffed75206a1b44d0038d55d0bad914fe497 /lib/assoc_array.c
parent1db604f676b2edb7b18de7881f4d5988e97be616 (diff)
lib/div64.c: off by one in shift
fls counts bits starting from 1 to 32 (returns 0 for zero argument). If we add 1 we shift right one bit more and loose precision from divisor, what cause function incorect results with some numbers. Corrected code was tested in user-space, see bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202391 Link: http://lkml.kernel.org/r/[email protected] Fixes: 658716d19f8f ("div64_u64(): improve precision on 32bit platforms") Signed-off-by: Stanislaw Gruszka <[email protected]> Reported-by: Siarhei Volkau <[email protected]> Tested-by: Siarhei Volkau <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/assoc_array.c')
0 files changed, 0 insertions, 0 deletions