mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 11:23:09 -04:00
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. Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
7c12d906f4
commit
9fd3f88cb6
@@ -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));
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user