]> git.baikalelectronics.ru Git - kernel.git/commit
s390/mm,pageattr: fix walk_pte_level() early exit
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 24 Aug 2021 13:21:44 +0000 (15:21 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 25 Aug 2021 09:03:34 +0000 (11:03 +0200)
commit32658441cbc011a5b5a78a0a6f64de8c7278fd03
tree20b2756b1da2350a4ac577382833d68eaf930025
parentd7f8bb90f4ca6c6a65e5edd9569b345ae68cf52a
s390/mm,pageattr: fix walk_pte_level() early exit

In case of splitting to 4k mapping the early exit in walk_pte_level()
must only be taken iff flags is equal to SET_MEMORY_4K.
Currently the early exit is taken if the flag is set, and also others
might be set. This may lead to the situation that a mapping is split
but other changes are not done, like e.g. setting pages to R/W.

There is currently no such caller, but there might be in the future.

Fixes: 0ea5a62f27df ("s390/mm: implement set_memory_4k()")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/mm/pageattr.c