mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Call pmap_copy() only for map entries which have the backing object
instantiated. Calling pmap_copy() on non-faulted anonymous memory entries is useless. Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
00de677313
commit
0ec97ffc10
1 changed files with 4 additions and 3 deletions
|
|
@ -3239,6 +3239,10 @@ vm_map_copy_entry(
|
|||
fake_entry->next = curthread->td_map_def_user;
|
||||
curthread->td_map_def_user = fake_entry;
|
||||
}
|
||||
|
||||
pmap_copy(dst_map->pmap, src_map->pmap,
|
||||
dst_entry->start, dst_entry->end - dst_entry->start,
|
||||
src_entry->start);
|
||||
} else {
|
||||
dst_entry->object.vm_object = NULL;
|
||||
dst_entry->offset = 0;
|
||||
|
|
@ -3248,9 +3252,6 @@ vm_map_copy_entry(
|
|||
*fork_charge += size;
|
||||
}
|
||||
}
|
||||
|
||||
pmap_copy(dst_map->pmap, src_map->pmap, dst_entry->start,
|
||||
dst_entry->end - dst_entry->start, src_entry->start);
|
||||
} else {
|
||||
/*
|
||||
* We don't want to make writeable wired pages copy-on-write.
|
||||
|
|
|
|||
Loading…
Reference in a new issue