Commit 171cd1cdfff32a99855ec80ca8cab43384fe0600

Authored by balrog
1 parent 523111e7

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
Showing 1 changed file with 1 additions and 2 deletions
linux-user/mmap.c
@@ -49,8 +49,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot) @@ -49,8 +49,7 @@ int target_mprotect(abi_ulong start, abi_ulong len, int prot)
49 end = start + len; 49 end = start + len;
50 if (end < start) 50 if (end < start)
51 return -EINVAL; 51 return -EINVAL;
52 - if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC))  
53 - return -EINVAL; 52 + prot &= PROT_READ | PROT_WRITE | PROT_EXEC;
54 if (len == 0) 53 if (len == 0)
55 return 0; 54 return 0;
56 55