Skip to content

Commit affe470

Browse files
committed
vm: Properly limit protection while cloning vm_map
1 parent d86bdcc commit affe470

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sys/kern/vm_map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ static vm_map_entry_t *vm_map_entry_clone_copy(vm_map_t *map,
477477
ent->flags |= VM_ENT_COW | VM_ENT_NEEDSCOPY;
478478
new->flags |= VM_ENT_COW | VM_ENT_NEEDSCOPY;
479479

480-
pmap_protect(map->pmap, ent->start, ent->end, ent->prot & (~VM_PROT_READ));
480+
pmap_protect(map->pmap, ent->start, ent->end, ent->prot & (~VM_PROT_WRITE));
481481
return new;
482482
}
483483

0 commit comments

Comments
 (0)