The patch titled memory hotadd fixes: find_next_system_ram catch range fix has been added to the -mm tree. Its filename is memory-hotadd-fixes-find_next_system_ram-catch-range.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: memory hotadd fixes: find_next_system_ram catch range fix From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> find_next_system_ram() is used to find available memory resource at onlining newly added memory. This patch fixes following problem. find_next_system_ram() cannot catch this case. Resource: (start)-------------(end) Section : (start)-------------(end) Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: Keith Mannthey <kmannth@xxxxxxxxx> Cc: Yasunori Goto <y-goto@xxxxxxxxxxxxxx> Cc: Dave Hansen <haveblue@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- kernel/resource.c | 3 ++- mm/memory_hotplug.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff -puN kernel/resource.c~memory-hotadd-fixes-find_next_system_ram-catch-range kernel/resource.c --- a/kernel/resource.c~memory-hotadd-fixes-find_next_system_ram-catch-range +++ a/kernel/resource.c @@ -244,6 +244,7 @@ int find_next_system_ram(struct resource start = res->start; end = res->end; + BUG_ON(start >= end); read_lock(&resource_lock); for (p = iomem_resource.child; p ; p = p->sibling) { @@ -254,7 +255,7 @@ int find_next_system_ram(struct resource p = NULL; break; } - if (p->start >= start) + if ((p->end >= start) && (p->start < end)) break; } read_unlock(&resource_lock); diff -puN mm/memory_hotplug.c~memory-hotadd-fixes-find_next_system_ram-catch-range mm/memory_hotplug.c --- a/mm/memory_hotplug.c~memory-hotadd-fixes-find_next_system_ram-catch-range +++ a/mm/memory_hotplug.c @@ -163,7 +163,7 @@ int online_pages(unsigned long pfn, unsi res.flags = IORESOURCE_MEM; /* we just need system ram */ section_end = res.end; - while (find_next_system_ram(&res) >= 0) { + while ((res.start < res.end) && (find_next_system_ram(&res) >= 0)) { start_pfn = (unsigned long)(res.start >> PAGE_SHIFT); nr_pages = (unsigned long) ((res.end + 1 - res.start) >> PAGE_SHIFT); _ Patches currently in -mm which might be from kamezawa.hiroyu@xxxxxxxxxxxxxx are memory-hotadd-fixes-not-aligned-memory-hotadd.patch memory-hotadd-fixes-change-find_next_system_rams.patch memory-hotadd-fixes-find_next_system_ram-catch-range.patch memory-hotadd-fixes-avoid-check-in-acpi.patch memory-hotadd-fixes-avoid-registering-res-twice.patch namespaces-utsname-sysctl-hack.patch reiser4-hardirq-include-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html