mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
The "rounded up to nearest power of 2 in size" algorithm in alloc_large_system_hash is not correct. As coded, it takes an otherwise acceptable power-of-2 value and doubles it. For example, we see the error if we boot with thash_entries=2097152 which produces a hash table with 4194304 entries. Signed-off-by: John Hawkes <[email protected]> Cc: Roland Dreier <[email protected]> Cc: "Chen, Kenneth W" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>