The patch below does not apply to the 3.11-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From 0196c642f76c469c17ca09d7f904bccc123bac09 Mon Sep 17 00:00:00 2001
From: Martin Schwidefsky <[email protected]>
Date: Tue, 27 Aug 2013 08:19:27 +0200
Subject: [PATCH] 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: [email protected] # 3.10+
Signed-off-by: Martin Schwidefsky <[email protected]>

diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 125e3790..1d144b6f 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -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);

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to