summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorGuillem Jover <guillem@hadrons.org>2011-08-25 15:22:40 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-08-27 01:09:30 +0200
commitb04de4e4b984a0423d67be6c1b5d528c3d1c01c0 (patch)
tree390058bf5ce71a6bcc21b6298deda3704278a801 /vm
parent91640ede1f8cdb066b2e562be628480ae6c83be6 (diff)
Initialize the new map entry when it's a projected buffer
* vm/vm_map.c (vm_map_fork): Call vm_map_entry_create for projected_on buffers too.
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/vm_map.c b/vm/vm_map.c
index 751e031..ce83403 100644
--- a/vm/vm_map.c
+++ b/vm/vm_map.c
@@ -4157,6 +4157,8 @@ vm_map_t vm_map_fork(old_map)
object->ref_count++;
vm_object_unlock(object);
+ new_entry = vm_map_entry_create(new_map);
+
if (old_entry->projected_on != 0) {
/*
* If entry is projected buffer, clone the
@@ -4171,7 +4173,6 @@ vm_map_t vm_map_fork(old_map)
* Mark both entries as shared.
*/
- new_entry = vm_map_entry_create(new_map);
vm_map_entry_copy(new_entry, old_entry);
old_entry->is_shared = TRUE;
new_entry->is_shared = TRUE;