diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-06-21 22:09:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-29 14:08:04 -0700 |
commit | 14b9d5c8e798cd4b101ed17ba84dff20a6609849 (patch) | |
tree | 1da3c07f504f6d35cd917a691460170d3b23ca51 /scripts/headerdep.pl | |
parent | 6d05cd302c104ace56a7314deec12f181a92c434 (diff) | |
download | lwn-14b9d5c8e798cd4b101ed17ba84dff20a6609849.tar.gz lwn-14b9d5c8e798cd4b101ed17ba84dff20a6609849.zip |
mm: fix wrong vmap address calculations with odd NR_CPUS values
commit f982f91516fa4cfd9d20518833cd04ad714585be upstream.
Commit db64fe02258f ("mm: rewrite vmap layer") introduced code that does
address calculations under the assumption that VMAP_BLOCK_SIZE is a
power of two. However, this might not be true if CONFIG_NR_CPUS is not
set to a power of two.
Wrong vmap_block index/offset values could lead to memory corruption.
However, this has never been observed in practice (or never been
diagnosed correctly); what caught this was the BUG_ON in vb_alloc() that
checks for inconsistent vmap_block indices.
To fix this, ensure that VMAP_BLOCK_SIZE always is a power of two.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=31572
Reported-by: Pavel Kysilka <goldenfish@linuxsoft.cz>
Reported-by: Matias A. Fonzo <selk@dragora.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'scripts/headerdep.pl')
0 files changed, 0 insertions, 0 deletions