slub: fix panic with DISCONTIGMEM
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Tue, 19 Apr 2011 21:29:36 +0000 (16:29 -0500)
committerSteve Conklin <sconklin@canonical.com>
Thu, 2 Jun 2011 19:23:05 +0000 (14:23 -0500)
commit7644e34747435cba024ee2da2756105cf124fd5b
tree0d83d4b30fb21cf3c31e53cff0c0b10c017ccd6a
parente8cefc1db1a0695d38bd658327e1c38423daa398
slub: fix panic with DISCONTIGMEM

BugLink: http://bugs.launchpad.net/bugs/775809

commit 4a5fa3590f09999f6db41bc386bce40848fa9f63 upstream.

Slub makes assumptions about page_to_nid() which are violated by
DISCONTIGMEM and !NUMA.  This violation results in a panic because
page_to_nid() can be non-zero for pages in the discontiguous ranges and
this leads to a null return by get_node().  The assertion by the
maintainer is that DISCONTIGMEM should only be allowed when NUMA is also
defined.  However, at least six architectures: alpha, ia64, m32r, m68k,
mips, parisc violate this.  The panic is a regression against slab, so
just mark slub broken in the problem configuration to prevent users
reporting these panics.

Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
init/Kconfig