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: TizenStudio_2.0_p2.3~11975 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ced911a8ce6c886c2c73cc63be1788f1d8f4435;p=sdk%2Femulator%2Fqemu.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 d459c61..fa01c7b 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;