diff options
author | 2021-06-04 20:01:08 -0700 | |
---|---|---|
committer | 2021-06-05 08:58:11 -0700 | |
commit | 50c25ee97cf6ab011542167ab590c17012cea4ed (patch) | |
tree | 571006f986d833981d1a4f162baf2a55e4eb3d4f /include/linux/pgtable.h | |
parent | Merge tag 'sound-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/t... (diff) | |
download | linux-50c25ee97cf6ab011542167ab590c17012cea4ed.tar.gz linux-50c25ee97cf6ab011542167ab590c17012cea4ed.tar.bz2 linux-50c25ee97cf6ab011542167ab590c17012cea4ed.zip |
Revert "MIPS: make userspace mapping young by default"
This reverts commit f685a533a7fab35c5d069dcd663f59c8e4171a75.
The MIPS cache flush logic needs to know whether the mapping was already
established to decide how to flush caches. This is done by checking the
valid bit in the PTE. The commit above breaks this logic by setting the
valid in the PTE in new mappings, which causes kernel crashes.
Link: https://lkml.kernel.org/r/20210526094335.92948-1-tsbogend@alpha.franken.de
Fixes: f685a533a7f ("MIPS: make userspace mapping young by default")
Reported-by: Zhou Yanjie <zhouyanjie@wanyeetech.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Huang Pei <huangpei@loongson.cn>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/pgtable.h')
-rw-r--r-- | include/linux/pgtable.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 46b13780c2c8..a43047b1030d 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -432,6 +432,14 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres * To be differentiate with macro pte_mkyoung, this macro is used on platforms * where software maintains page access bit. */ +#ifndef pte_sw_mkyoung +static inline pte_t pte_sw_mkyoung(pte_t pte) +{ + return pte; +} +#define pte_sw_mkyoung pte_sw_mkyoung +#endif + #ifndef pte_savedwrite #define pte_savedwrite pte_write #endif |