Commit eb0a5728 authored by Andi Kleen's avatar Andi Kleen Committed by Arnaldo Carvalho de Melo

[PATCH] discontigmem fix

Try to avoid calling "pfn_to_page()" on invalid pfn's.  It used to be
legal, but the CONFIG_DISCONTIGMEM people want us to try to avoid it,
since they do magic stuff in their "pfn_to_page" translations.
parent d33334d3
......@@ -292,8 +292,11 @@ skip_copy_pmd_range: address = (address + PGDIR_SIZE) & PGDIR_MASK;
* and not mapped via rmap - duplicate the
* mapping as is.
*/
page = pfn_to_page(pfn);
if (!pfn_valid(pfn) || PageReserved(page)) {
page = NULL;
if (pfn_valid(pfn))
page = pfn_to_page(pfn);
if (!page || PageReserved(page)) {
set_pte(dst_pte, pte);
goto cont_copy_pte_range_noset;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment