]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] memory hotplug: prevent memory zone interleave
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Fri, 24 Feb 2012 17:01:29 +0000 (18:01 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 24 Feb 2012 17:01:36 +0000 (18:01 +0100)
commitfe91d5838134542fc82512624e2552b9c252dd56
treee66d38b909ee69025d996a37cb27e2f1ad8c4210
parent089911d7c20460414106e1679cbb173e7099306e
[S390] memory hotplug: prevent memory zone interleave

This fixes a kernel oops with CONFIG_DEBUG_VM triggered by a
VM_BUG_ON(bad_range()): kernel BUG at mm/page_alloc.c:748.

With memory hotplug on System z, it is possible that the memory
online/offline state is preserved over a system restart, e.g. there
may be offline memory blocks in ZONE_DMA or ZONE_NORMAL. So far,
the offline memory range has always been added to ZONE_MOVABLE during
system start, so that it was possible to have ZONE_MOVABLE interleave
with ZONE_DMA or ZONE_NORMAL. This patch fixes that by checking for
zone overlap before adding memory.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/init.c