]> xenbits.xensource.com Git - qemu-xen-3.4-testing.git/commitdiff
Cope with arch-specific page protection flags in mmap (Richard Purdie).
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 24 Apr 2008 21:11:41 +0000 (21:11 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 24 Apr 2008 21:11:41 +0000 (21:11 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4250 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/mmap.c

index d459c61b290a224ab9a9ce6803ec24f1c6de9aae..fa01c7bc2af9901298d0af61aa634b4881932f89 100644 (file)
@@ -49,8 +49,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
     end = start + len;
     if (end < start)
         return -EINVAL;
-    if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC))
-        return -EINVAL;
+    prot &= PROT_READ | PROT_WRITE | PROT_EXEC;
     if (len == 0)
         return 0;