mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] MIPS: Fix highmem crash in __update_cache.
@ 2015-04-15 13:10 Lars Persson
  0 siblings, 0 replies; only message in thread
From: Lars Persson @ 2015-04-15 13:10 UTC (permalink / raw)
  To: ralf, linux-mips, linux-kernel; +Cc: Lars Persson

Due to a change in flush_dcache_page, highmem pages may have the
dcache dirty flag set. Until there is proper support for highmen in
cache.c we must filter out highmem pages to avoid NULL pointer
dereferences.

Signed-off-by: Lars Persson <larper@axis.com>
---
 arch/mips/mm/cache.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 77d96db..46136f6 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -142,6 +142,10 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address,
 	if (unlikely(!pfn_valid(pfn)))
 		return;
 	page = pfn_to_page(pfn);
+
+	if (PageHighMem(page))
+		return;
+
 	if (page_mapping(page) && Page_dcache_dirty(page)) {
 		addr = (unsigned long) page_address(page);
 		if (exec || pages_do_alias(addr, address & PAGE_MASK))
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-15 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15 13:10 [PATCH] MIPS: Fix highmem crash in __update_cache Lars Persson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®