projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78bfa70
)
csky: Fixup update_mmu_cache called with user io mapping
author
Guo Ren
<guoren@linux.alibaba.com>
Fri, 25 Dec 2020 06:37:08 +0000
(06:37 +0000)
committer
Guo Ren
<guoren@linux.alibaba.com>
Tue, 12 Jan 2021 01:52:41 +0000
(09:52 +0800)
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>
arch/csky/abiv2/cacheflush.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/csky/abiv2/cacheflush.c
b/arch/csky/abiv2/cacheflush.c
index 790f1ebfba44ba925ccd94f1927b61e03137dbc6..39c51399dd81da57ef4d9c580bd31bdf5e2b6f0b 100644
(file)
--- 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;