Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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);
	}
	}
}
}