From 171cd1cdfff32a99855ec80ca8cab43384fe0600 Mon Sep 17 00:00:00 2001 From: balrog Date: Thu, 24 Apr 2008 21:11:41 +0000 Subject: 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 --- linux-user/mmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'linux-user') 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; -- cgit v1.2.3