Merge branches 'devel-stable', 'fixes' and 'mmci' into for-linus
[firefly-linux-kernel-4.4.55.git] / arch / arm / include / asm / pgtable.h
index f30ac3b55ba981cbea401558dbab55da87201afa..80d6fc4dbe4aac34b2111c94e4adc473166f6c68 100644 (file)
@@ -247,7 +247,8 @@ static inline pte_t pte_mkspecial(pte_t pte) { return pte; }
 
 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 {
-       const pteval_t mask = L_PTE_XN | L_PTE_RDONLY | L_PTE_USER | L_PTE_NONE;
+       const pteval_t mask = L_PTE_XN | L_PTE_RDONLY | L_PTE_USER |
+               L_PTE_NONE | L_PTE_VALID;
        pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
        return pte;
 }