Patchwork powerpc: oops in pseries_lmb_remove()

login
register
mail settings
Submitter Nathan Fontenot
Date Oct. 1, 2008, 7:44 p.m.
Message ID <48E3D302.5040206@austin.ibm.com>
Download mbox | patch
Permalink /patch/2302/
State Accepted, archived
Commit 9fd3f88cb67ac51bd5face8441472b91e042be67
Headers show

Comments

Nathan Fontenot - Oct. 1, 2008, 7:44 p.m.
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>

---

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