mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
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: b3e1a00c8f
("s390/mm: implement set_memory_4k()")
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
This commit is contained in:
parent
8b5f08b484
commit
c4f0e5cfde
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ static int walk_pte_level(pmd_t *pmdp, unsigned long addr, unsigned long end,
|
||||||
{
|
{
|
||||||
pte_t *ptep, new;
|
pte_t *ptep, new;
|
||||||
|
|
||||||
if ((flags & SET_MEMORY_4K) == SET_MEMORY_4K)
|
if (flags == SET_MEMORY_4K)
|
||||||
return 0;
|
return 0;
|
||||||
ptep = pte_offset_kernel(pmdp, addr);
|
ptep = pte_offset_kernel(pmdp, addr);
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in a new issue