- memory-hotadd-fixes-find_next_system_ram-catch-range.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     memory hotadd fixes: find_next_system_ram catch range fix

has been removed from the -mm tree.  Its filename is

     memory-hotadd-fixes-find_next_system_ram-catch-range.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
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

hot-add-mem-x86_64-acpi-motherboard-fix.patch
hot-add-mem-x86_64-fixup-externs.patch
hot-add-mem-x86_64-kconfig-changes.patch
hot-add-mem-x86_64-enable-sparsemem-in-sratc.patch
hot-add-mem-x86_64-memory_add_physaddr_to_nid-enable.patch
hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup.patch
hot-add-mem-x86_64-memory_add_physaddr_to_nid-node-fixup-fix.patch
hot-add-mem-x86_64-x86_64-kernel-mapping-fix.patch
hot-add-mem-x86_64-use-config_memory_hotplug_sparse.patch
hot-add-mem-x86_64-use-config_memory_hotplug_reserve.patch
hot-add-mem-x86_64-valid-add-range-check.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux