From: balrog Date: Thu, 24 Apr 2008 21:11:41 +0000 (+0000) Subject: Cope with arch-specific page protection flags in mmap (Richard Purdie). X-Git-Tag: xen-3.3.0-rc1~194^2^2~202 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=171cd1cdfff32a99855ec80ca8cab43384fe0600;p=qemu-xen-3.4-testing.git Cope with arch-specific page protection flags in mmap (Richard Purdie). git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4250 c046a42c-6fe2-441c-8c8c-71466251a162 --- diff --git a/linux-user/mmap.c b/linux-user/mmap.c index d459c61b..fa01c7bc 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -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;