diff options
-rw-r--r-- | linux-user/mmap.c | 3 |
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; |