summaryrefslogtreecommitdiffstats
path: root/arch/csky
diff options
context:
space:
mode:
authorGuo Ren <guoren@linux.alibaba.com>2020-12-25 07:37:08 +0100
committerGuo Ren <guoren@linux.alibaba.com>2021-01-12 02:52:41 +0100
commit3e455cf5f30f87bc871d5fe891841a2cefb29234 (patch)
treed7d797cfcfd2e778d85aa4d70e6f1cbd6f87bdba /arch/csky
parentcsky: Fixup FAULT_FLAG_XXX param for handle_mm_fault (diff)
downloadlinux-3e455cf5f30f87bc871d5fe891841a2cefb29234.tar.xz
linux-3e455cf5f30f87bc871d5fe891841a2cefb29234.zip
csky: Fixup update_mmu_cache called with user io mapping
The function update_mmu_cache could be called by user-io mapping. There is no space of struct page in mem_map for the pte. Just ignore the user-io mmaping in update_mmu_cache. Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Diffstat (limited to 'arch/csky')
-rw-r--r--arch/csky/abiv2/cacheflush.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/csky/abiv2/cacheflush.c b/arch/csky/abiv2/cacheflush.c
index 790f1ebfba44..39c51399dd81 100644
--- a/arch/csky/abiv2/cacheflush.c
+++ b/arch/csky/abiv2/cacheflush.c
@@ -12,6 +12,9 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
unsigned long addr;
struct page *page;
+ if (!pfn_valid(pte_pfn(*pte)))
+ return;
+
page = pfn_to_page(pte_pfn(*pte));
if (page == ZERO_PAGE(0))
return;