]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "MIPS: make userspace mapping young by default"
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>
Sat, 5 Jun 2021 03:01:08 +0000 (20:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 5 Jun 2021 15:58:11 +0000 (08:58 -0700)
commit2ca3385ef49913bb091e128db01209569b07d3e9
tree571006f986d833981d1a4f162baf2a55e4eb3d4f
parentfe7e8221a215ee6cd215f98477d33af777004043
Revert "MIPS: make userspace mapping young by default"

This reverts commit 7538aa9138ea02fcf96d9dcc729427526acfbad1.

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: 7538aa9138e ("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>
arch/mips/mm/cache.c
include/linux/pgtable.h
mm/memory.c