vmspace_fork(): do not override offset for the guard entries
The offset field contains protection for the stack guards.
Reported by: cy
Fixes: 21e45c30c3
MFC after: 1 week
This commit is contained in:
+2
-1
@@ -4181,7 +4181,8 @@ vm_map_copy_entry(
|
||||
src_entry->start);
|
||||
} else {
|
||||
dst_entry->object.vm_object = NULL;
|
||||
dst_entry->offset = 0;
|
||||
if ((dst_entry->eflags & MAP_ENTRY_GUARD) == 0)
|
||||
dst_entry->offset = 0;
|
||||
if (src_entry->cred != NULL) {
|
||||
dst_entry->cred = curthread->td_ucred;
|
||||
crhold(dst_entry->cred);
|
||||
|
||||
Reference in New Issue
Block a user