projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e92336
)
parisc: add WARN_ON() to clear_fixmap
author
Sven Schnelle
<svens@stackframe.org>
Wed, 5 Jun 2019 20:32:19 +0000
(22:32 +0200)
committer
Helge Deller
<deller@gmx.de>
Sat, 8 Jun 2019 10:56:26 +0000
(12:56 +0200)
Calling clear_fixmap() on an already cleared fixed mapping is
a bad thing to do. Add a WARN_ON() to catch such issues.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/mm/fixmap.c
patch
|
blob
|
history
diff --git
a/arch/parisc/mm/fixmap.c
b/arch/parisc/mm/fixmap.c
index c8d41b54fb1947a5c74128b8190a11ba5debeb4f..36321bcd75bac9c6dfd0ad4d7e5d7db44e4cde35 100644
(file)
--- a/
arch/parisc/mm/fixmap.c
+++ b/
arch/parisc/mm/fixmap.c
@@
-35,6
+35,9
@@
void clear_fixmap(enum fixed_addresses idx)
pmd_t *pmd = pmd_offset(pgd, vaddr);
pte_t *pte = pte_offset_kernel(pmd, vaddr);
+ if (WARN_ON(pte_none(*pte)))
+ return;
+
pte_clear(&init_mm, vaddr, pte);
flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE);