summaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-24 21:11:41 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-24 21:11:41 +0000
commit5ced911a8ce6c886c2c73cc63be1788f1d8f4435 (patch)
tree9ee389add7f18f49edb3eaa975b735445fbafd38 /linux-user
parenta46764c3a392a4c554756cceaaa17a0f3718d9f5 (diff)
downloadqemu-5ced911a8ce6c886c2c73cc63be1788f1d8f4435.tar.gz
qemu-5ced911a8ce6c886c2c73cc63be1788f1d8f4435.tar.bz2
qemu-5ced911a8ce6c886c2c73cc63be1788f1d8f4435.zip
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
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/mmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index d459c61b29..fa01c7bc2a 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;