Skip to content

Commit

Permalink
powerpc: Oops in pseries_lmb_remove()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nathan Fontenot authored and Benjamin Herrenschmidt committed Oct 10, 2008
1 parent 7c12d90 commit 9fd3f88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/hotplug-memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

/*
Expand Down

0 comments on commit 9fd3f88

Please sign in to comment.