diff options
-rw-r--r-- | sys/vm/vm_object.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index e680a22..dfcade1 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1317,6 +1317,14 @@ vm_object_split(vm_map_entry_t entry) source = orig_object->backing_object; if (source != NULL) { VM_OBJECT_LOCK(source); + if ((source->flags & OBJ_DEAD) != 0) { + VM_OBJECT_UNLOCK(source); + VM_OBJECT_UNLOCK(orig_object); + VM_OBJECT_UNLOCK(new_object); + vm_object_deallocate(new_object); + VM_OBJECT_LOCK(orig_object); + return; + } LIST_INSERT_HEAD(&source->shadow_head, new_object, shadow_list); source->shadow_count++; |