From: Badari Pulavarty <pbadari@us.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm <linux-mm@kvack.org>
Subject: [PATCH][-mm only] Error handling in walk_memory_resource()
Date: Mon, 01 Oct 2007 15:07:18 -0700 [thread overview]
Message-ID: <1191276438.30691.13.camel@dyn9047017100.beaverton.ibm.com> (raw)
Hi,
I found this while trying to get hotplug memory remove working on ppc64.
ppc64 doesn't show all the memory regions in /proc/iomem like ia64 or
x86_64 and we end up wrongly offling pages.
Thanks,
Badari
walk_memory_resource() should return failure, if it can't find the memory
region in the /proc/iomem. Otherwise, offline_pages() would end up isolating
pages wrongly.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
---
kernel/resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.23-rc8/kernel/resource.c
===================================================================
--- linux-2.6.23-rc8.orig/kernel/resource.c 2007-10-01 14:09:01.000000000 -0700
+++ linux-2.6.23-rc8/kernel/resource.c 2007-10-01 14:09:35.000000000 -0700
@@ -284,7 +284,7 @@ walk_memory_resource(unsigned long start
struct resource res;
unsigned long pfn, len;
u64 orig_end;
- int ret;
+ int ret = -1;
res.start = (u64) start_pfn << PAGE_SHIFT;
res.end = ((u64)(start_pfn + nr_pages) << PAGE_SHIFT) - 1;
res.flags = IORESOURCE_MEM;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2007-10-01 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-01 22:07 Badari Pulavarty [this message]
2007-10-02 0:32 ` KAMEZAWA Hiroyuki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1191276438.30691.13.camel@dyn9047017100.beaverton.ibm.com \
--to=pbadari@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox