Commit e228929b authored by Paul Mundt's avatar Paul Mundt Committed by Linus Torvalds

mm: fix memory hotplug oops from ZONE_MOVABLE changes.

zone_movable_pfn is presently marked as __initdata and referenced from
adjust_zone_range_for_zone_movable(), which in turn is referenced by
zone_spanned_pages_in_node().  Both of these are __meminit annotated.  When
memory hotplug is enabled, this will oops on a hot-add, due to
zone_movable_pfn having been freed.

__meminitdata annotation gives the desired behaviour.

This will only impact platforms that enable both memory hotplug
and ARCH_POPULATES_NODE_MAP.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
Acked-by: default avatarMel Gorman <mel@csn.ul.ie>
Acked-by: default avatarKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8d1b8753
...@@ -138,7 +138,7 @@ static unsigned long __meminitdata dma_reserve; ...@@ -138,7 +138,7 @@ static unsigned long __meminitdata dma_reserve;
#endif /* CONFIG_MEMORY_HOTPLUG_RESERVE */ #endif /* CONFIG_MEMORY_HOTPLUG_RESERVE */
unsigned long __initdata required_kernelcore; unsigned long __initdata required_kernelcore;
unsigned long __initdata required_movablecore; unsigned long __initdata required_movablecore;
unsigned long __initdata zone_movable_pfn[MAX_NUMNODES]; unsigned long __meminitdata zone_movable_pfn[MAX_NUMNODES];
/* movable_zone is the "real" zone pages in ZONE_MOVABLE are taken from */ /* movable_zone is the "real" zone pages in ZONE_MOVABLE are taken from */
int movable_zone; int movable_zone;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment