linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc: oops in pseries_lmb_remove()
@ 2008-10-01 19:44 Nathan Fontenot
  0 siblings, 0 replies; only message in thread
From: Nathan Fontenot @ 2008-10-01 19:44 UTC (permalink / raw)
  To: linuxppc-dev

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>

---

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-01 19:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01 19:44 [PATCH] powerpc: oops in pseries_lmb_remove() 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).