提交 04badfd2 编写于 作者: N Nathan Fontenot 提交者: Benjamin Herrenschmidt

powerpc/pseries: Validate PFN in pseries_remove_lmb()

The pfn of the memory to be removed should be validated prior to
attempting to remove the memory.  In cases where the probe of a
memory section fails during hotplug add, the pfn for the lmb may
not be valid.
Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: NNathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 c10c178a
......@@ -22,6 +22,12 @@ static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size)
int ret;
start_pfn = base >> PAGE_SHIFT;
if (!pfn_valid(start_pfn)) {
lmb_remove(base, lmb_size);
return 0;
}
zone = page_zone(pfn_to_page(start_pfn));
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册