Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4c031b4 authored by Jan Glauber's avatar Jan Glauber Committed by Martin Schwidefsky
Browse files

[S390] fix page table walk for changing page attributes



The page table walk for changing page attributes used the wrong
address for pgd/pud/pmd lookups if the range was bigger than
a pmd entry. Fix the lookup by using the correct address.

Signed-off-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent c708c57e
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -24,12 +24,13 @@ static void change_page_attr(unsigned long addr, int numpages,
			WARN_ON_ONCE(1);
			WARN_ON_ONCE(1);
			continue;
			continue;
		}
		}
		ptep = pte_offset_kernel(pmdp, addr + i * PAGE_SIZE);
		ptep = pte_offset_kernel(pmdp, addr);


		pte = *ptep;
		pte = *ptep;
		pte = set(pte);
		pte = set(pte);
		ptep_invalidate(&init_mm, addr + i * PAGE_SIZE, ptep);
		ptep_invalidate(&init_mm, addr, ptep);
		*ptep = pte;
		*ptep = pte;
		addr += PAGE_SIZE;
	}
	}
}
}