aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-02-04 10:48:08 -0500
committerIngo Molnar <mingo@elte.hu>2008-02-04 10:48:08 -0500
commit7bfb72e847c201fe32271fb13f75d060671d8890 (patch)
treec00cf13f19c508548819c249c068d043d692213a /arch/x86/mm/pageattr.c
parent6ce9fc17d913ae51f8434d2826f306347820b07d (diff)
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>
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r--arch/x86/mm/pageattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 0b029c97174e..9be684e61dcb 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -119,7 +119,7 @@ static void cpa_flush_range(unsigned long start, int numpages, int cache)
119 /* 119 /*
120 * Only flush present addresses: 120 * Only flush present addresses:
121 */ 121 */
122 if (pte && pte_present(*pte)) 122 if (pte && (pte_val(*pte) & _PAGE_PRESENT))
123 clflush_cache_range((void *) addr, PAGE_SIZE); 123 clflush_cache_range((void *) addr, PAGE_SIZE);
124 } 124 }
125} 125}