* [PATCH] powerpc: pseries_remove_lmb() should validate pfn
@ 2008-10-13 18:42 Nathan Fontenot
0 siblings, 0 replies; only message in thread
From: Nathan Fontenot @ 2008-10-13 18:42 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Badari Pulavarty
The pfn of the memory to be removed should be validated prior to
attempting to remove the memory. In cases where the probe of a
memory section fails during hotplug add, the pfn for the lmb may
not be valid.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
---
--- linux-2.6.orig/arch/powerpc/platforms/pseries/hotplug-memory.c 2008-10-01 14:20:08.000000000 -0500
+++ linux-2.6/arch/powerpc/platforms/pseries/hotplug-memory.c 2008-10-13 13:19:49.000000000 -0500
@@ -22,6 +22,12 @@
int ret;
start_pfn = base >> PAGE_SHIFT;
+
+ if (!pfn_valid(start_pfn)) {
+ lmb_remove(base, lmb_size);
+ return 0;
+ }
+
zone = page_zone(pfn_to_page(start_pfn));
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-10-13 20:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13 18:42 [PATCH] powerpc: pseries_remove_lmb() should validate pfn Nathan Fontenot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).