]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/x86/mm/ioremap.c
x86/mm: Do not auto-massage page protections
[mirror_ubuntu-bionic-kernel.git] / arch / x86 / mm / ioremap.c
index e2db83bebc3b71a7842404b938f3bb1c2f1e7fae..c63a545ec199547776ae8dce2d4258955c68d5f4 100644 (file)
@@ -816,6 +816,9 @@ void __init __early_set_fixmap(enum fixed_addresses idx,
        }
        pte = early_ioremap_pte(addr);
 
+       /* Sanitize 'prot' against any unsupported bits: */
+       pgprot_val(flags) &= __default_kernel_pte_mask;
+
        if (pgprot_val(flags))
                set_pte(pte, pfn_pte(phys >> PAGE_SHIFT, flags));
        else