Skip to content

Commit

Permalink
s390/pgtable: fix mprotect for single-threaded KVM guests
Browse files Browse the repository at this point in the history
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: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Aug 28, 2013
1 parent 0587d40 commit 0196c64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/s390/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0196c64

Please sign in to comment.