Commit 7bfb72e8 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

x86: fix page-present check in cpa_flush_range

pte_present() might return true for PROT_NONE mappings.
Explicitely check the present bit.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 6ce9fc17
......@@ -119,7 +119,7 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache)
/*
* Only flush present addresses:
*/
if (pte && pte_present(*pte))
if (pte && (pte_val(*pte) & _PAGE_PRESENT))
clflush_cache_range((void *) addr, PAGE_SIZE);
}
}
......
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