From b04de4e4b984a0423d67be6c1b5d528c3d1c01c0 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 25 Aug 2011 15:22:40 +0200 Subject: 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. --- vm/vm_map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vm') 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; -- cgit v1.2.3