[PATCH] powerpc: oops in pseries_lmb_remove()

Nathan Fontenot nfont at austin.ibm.com
Thu Oct 2 05:44:02 EST 2008


Testing hotplug memory remove has revealed that we can oops in
pseries_lmb_remove().  The incorrect shift causes a NULL pointer
dereference in the page_zone() inline routine.

I have only been able to reproduce the oops on kernels with large pages
enabled.

Tested on Power5 and Power6 with and without large pages enabled.

Signed-off-by: Nathan Fontenot <nfont at austin.ibm.com>

---

Index: linux-2.6-paulus/arch/powerpc/platforms/pseries/hotplug-memory.c
===================================================================
--- linux-2.6-paulus.orig/arch/powerpc/platforms/pseries/hotplug-memory.c	2008-08-25 13:08:27.000000000 -0500
+++ linux-2.6-paulus/arch/powerpc/platforms/pseries/hotplug-memory.c	2008-10-01 14:20:08.000000000 -0500
@@ -21,7 +21,7 @@
 	struct zone *zone;
 	int ret;
 
-	start_pfn = base >> PFN_SECTION_SHIFT;
+	start_pfn = base >> PAGE_SHIFT;
 	zone = page_zone(pfn_to_page(start_pfn));
 
 	/*



More information about the Linuxppc-dev mailing list