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: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
6ce9fc17d9
commit
7bfb72e847
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache)
|
||||||
/*
|
/*
|
||||||
* Only flush present addresses:
|
* Only flush present addresses:
|
||||||
*/
|
*/
|
||||||
if (pte && pte_present(*pte))
|
if (pte && (pte_val(*pte) & _PAGE_PRESENT))
|
||||||
clflush_cache_range((void *) addr, PAGE_SIZE);
|
clflush_cache_range((void *) addr, PAGE_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue