diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 389015760a45..c45b97484498 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1050,8 +1050,9 @@ exec_new_vmspace(imgp, sv) vm_object_reference(obj); error = vm_map_fixed(map, obj, 0, sv->sv_shared_page_base, sv->sv_shared_page_len, - VM_PROT_READ | VM_PROT_EXECUTE, VM_PROT_ALL, - MAP_COPY_ON_WRITE | MAP_ACC_NO_CHARGE); + VM_PROT_READ | VM_PROT_EXECUTE, + VM_PROT_READ | VM_PROT_EXECUTE, + MAP_INHERIT_SHARE | MAP_ACC_NO_CHARGE); if (error) { vm_object_deallocate(obj); return (error);