]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/x86/mm/pgtable.c
x86/mm: Do not auto-massage page protections
[linux.git] / arch / x86 / mm / pgtable.c
index 34cda7e0551b4a8809bb4a1a9fedef22ce4a4e28..d10a40aceeaa174a344c7a10139d7958fb3784d2 100644 (file)
@@ -583,6 +583,9 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
 void native_set_fixmap(enum fixed_addresses idx, phys_addr_t phys,
                       pgprot_t flags)
 {
+       /* Sanitize 'prot' against any unsupported bits: */
+       pgprot_val(flags) &= __default_kernel_pte_mask;
+
        __native_set_fixmap(idx, pfn_pte(phys >> PAGE_SHIFT, flags));
 }