+ memory-hotadd-fixes-change-find_next_system_rams.patch added to -mm tree

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

 



The patch titled

     memory hotadd fixes: change find_next_system_ram's return value manner

has been added to the -mm tree.  Its filename is

     memory-hotadd-fixes-change-find_next_system_rams.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: change find_next_system_ram's return value manner
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>

find_next_system_ram() returns valid memory range which meets requested area,
only used by memory-hot-add.

This function always rewrite requested resource even if returned area is not
fully fit in requested one.  And sometimes the returnd resource is larger than
requested area.  This annoyes the caller.  This patch changes the returned
value to fit in requested area.

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 |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff -puN kernel/resource.c~memory-hotadd-fixes-change-find_next_system_rams kernel/resource.c
--- a/kernel/resource.c~memory-hotadd-fixes-change-find_next_system_rams
+++ a/kernel/resource.c
@@ -261,8 +261,10 @@ int find_next_system_ram(struct resource
 	if (!p)
 		return -1;
 	/* copy data */
-	res->start = p->start;
-	res->end = p->end;
+	if (res->start < p->start)
+		res->start = p->start;
+	if (res->end > p->end)
+		res->end = p->end;
 	return 0;
 }
 #endif
_

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

[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