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
commit171cd1cdfff32a99855ec80ca8cab43384fe0600 (patch)
tree9ee389add7f18f49edb3eaa975b735445fbafd38 /linux-user
parent523111e7efb8ad61e1d91edebee1702a45873b04 (diff)
downloadqemu-171cd1cdfff32a99855ec80ca8cab43384fe0600.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;