diff mbox

powerpc: oops in pseries_lmb_remove()

Message ID 48E3D302.5040206@austin.ibm.com (mailing list archive)
State Accepted, archived
Commit 9fd3f88cb67ac51bd5face8441472b91e042be67
Headers show

Commit Message

Nathan Fontenot Oct. 1, 2008, 7:44 p.m. UTC
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@austin.ibm.com>

---
diff mbox

Patch

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));
 
 	/*