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

Commit 0196c642 authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

s390/pgtable: fix mprotect for single-threaded KVM guests



For a single-threaded KVM guest ptep_modify_prot_start will not use
IPTE, the invalid bit will therefore not be set. If DEBUG_VM is set
pgste_set_key called by ptep_modify_prot_commit will complain about
the missing invalid bit. ptep_modify_prot_start should set the
invalid bit in all cases.

Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 0587d409
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1093,6 +1093,7 @@ static inline pte_t ptep_modify_prot_start(struct mm_struct *mm,

	pte = *ptep;
	ptep_flush_lazy(mm, address, ptep);
	pte_val(*ptep) |= _PAGE_INVALID;

	if (mm_has_pgste(mm)) {
		pgste = pgste_update_all(&pte, pgste);