Lock some manipulations of the vm object's flags.
This commit is contained in:
parent
b077a36297
commit
e2479b4fc3
@ -2286,9 +2286,9 @@ vm_map_copy_entry(
|
||||
}
|
||||
|
||||
vm_object_reference(src_object);
|
||||
vm_object_lock(src_object);
|
||||
VM_OBJECT_LOCK(src_object);
|
||||
vm_object_clear_flag(src_object, OBJ_ONEMAPPING);
|
||||
vm_object_unlock(src_object);
|
||||
VM_OBJECT_UNLOCK(src_object);
|
||||
dst_entry->object.vm_object = src_object;
|
||||
src_entry->eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY);
|
||||
dst_entry->eflags |= (MAP_ENTRY_COW|MAP_ENTRY_NEEDS_COPY);
|
||||
@ -2378,9 +2378,9 @@ vmspace_fork(struct vmspace *vm1)
|
||||
vm_object_deallocate(object);
|
||||
object = old_entry->object.vm_object;
|
||||
}
|
||||
vm_object_lock(object);
|
||||
VM_OBJECT_LOCK(object);
|
||||
vm_object_clear_flag(object, OBJ_ONEMAPPING);
|
||||
vm_object_unlock(object);
|
||||
VM_OBJECT_UNLOCK(object);
|
||||
|
||||
/*
|
||||
* Clone the entry, referencing the shared object.
|
||||
|
@ -1171,7 +1171,9 @@ vm_object_split(vm_map_entry_t entry)
|
||||
vm_object_reference(source); /* Referenced by new_object */
|
||||
TAILQ_INSERT_TAIL(&source->shadow_head,
|
||||
new_object, shadow_list);
|
||||
VM_OBJECT_LOCK(source);
|
||||
vm_object_clear_flag(source, OBJ_ONEMAPPING);
|
||||
VM_OBJECT_UNLOCK(source);
|
||||
new_object->backing_object_offset =
|
||||
orig_object->backing_object_offset + offset;
|
||||
new_object->backing_object = source;
|
||||
|
Loading…
Reference in New Issue
Block a user