]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Oops in pseries_lmb_remove()
authorNathan Fontenot <nfont@austin.ibm.com>
Wed, 1 Oct 2008 09:44:02 +0000 (09:44 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 10 Oct 2008 04:55:17 +0000 (15:55 +1100)
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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/hotplug-memory.c

index a1a368dd2d992adb57f4b99942ffdb1e6e55a87b..140d02a5232af273b617a464fa08052438266262 100644 (file)
@@ -21,7 +21,7 @@ static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size)
        struct zone *zone;
        int ret;
 
-       start_pfn = base >> PFN_SECTION_SHIFT;
+       start_pfn = base >> PAGE_SHIFT;
        zone = page_zone(pfn_to_page(start_pfn));
 
        /*