X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Fmprotect.c;h=360d9cc8b38c061185d562fc40b7f032ae34d21d;hb=42b7772812d15b86543a23b82bd6070eef9a08b1;hp=acfe7c8d72fcff59dec990869a5fce9d63b56e55;hpb=2b4fa851b2f06fdb04cac808b57324f5e51e1578;p=linux-2.6 diff --git a/mm/mprotect.c b/mm/mprotect.c index acfe7c8d72..360d9cc8b3 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -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;