diff options
Diffstat (limited to 'vm')
-rw-r--r-- | vm/vm_user.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vm/vm_user.c b/vm/vm_user.c index 934e3e50..42ee5e08 100644 --- a/vm/vm_user.c +++ b/vm/vm_user.c @@ -357,9 +357,9 @@ kern_return_t vm_map( if (!copy) { - /* Disallow protection beyond proxy's own limits. */ - if ((cur_protection & ~prot) || (max_protection & ~prot)) - return KERN_PROTECTION_FAILURE; + /* Reduce the allowed access to the memory object. */ + max_protection &= prot; + cur_protection &= prot; } else { |