Skip to content

Commit

Permalink
vmspace_fork(): update rev_entry
Browse files Browse the repository at this point in the history
If the epoch is open we may be in the midst of a revocation and thus
rev_entry may be set in old_map.  In that case, set the corresponding
entry in new_map.
  • Loading branch information
brooksdavis committed Jun 30, 2023
1 parent 5464555 commit eb2863c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sys/vm/vm_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -5250,6 +5250,13 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_charge)
new_entry->cred = NULL;

vm_map_entry_link(new_map, new_entry);
/*
* Install as rev_entry if required before adding
* to the quarantine list so we don't get merged
* with a newly quarantined neighbor.
*/
if (old_entry == old_map->rev_entry)
new_map->rev_entry = new_entry;
vm_map_entry_quarantine(new_map, new_entry);
vmspace_map_entry_forked(vm1, vm2, new_entry);

Expand Down

0 comments on commit eb2863c

Please sign in to comment.