提交 7bfb72e8 编写于 作者: T Thomas Gleixner 提交者: 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: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册