Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
[pandora-kernel.git] / mm / mprotect.c
index acfe7c8..360d9cc 100644 (file)
@@ -237,7 +237,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;