Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: 658716d ("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]>
- Loading branch information