mm: Allow architectures to define additional protection bits
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / mm / mprotect.c
index a5bf31c273757848ae7614bd9fc3c8595c493705..ecfaa5844b5f4610dac3e62ee0f774ac1bf67863 100644 (file)
@@ -239,7 +239,7 @@ sys_mprotect(unsigned long start, size_t len, unsigned long prot)
        end = start + len;
        if (end <= start)
                return -ENOMEM;
-       if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC | PROT_SEM))
+       if (!arch_validate_prot(prot))
                return -EINVAL;
 
        reqprot = prot;