Skip to contentSkip to conversation

powerpc: oops in pseries_lmb_remove()

PATCH New Nathan Fontenot 1 participant 1 message Oct 1, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: oops in pseries_lmb_remove()

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.

---

arch/powerpc/platforms/pseries/hotplug-memory.c +0 -0
Index: linux-2.6-paulus/arch/powerpc/platforms/pseries/hotplug-memory.c
===================================================================
@@ -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));

	/*