summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-01-03 09:15:43 +0000
committeralc <alc@FreeBSD.org>2003-01-03 09:15:43 +0000
commit2db78e226faeecf35e91d2edfbefb583b9759771 (patch)
tree5e8cab86ce03148829de88085b464d10707fdf23 /sys/vm/vm_map.c
parentdd55faeb5ea8ffa4ec04522a8208c2afed82f241 (diff)
downloadFreeBSD-src-2db78e226faeecf35e91d2edfbefb583b9759771.zip
FreeBSD-src-2db78e226faeecf35e91d2edfbefb583b9759771.tar.gz
Lock the vm object when performing vm_object_clear_flag().
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 9b863de..97d7c6d 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2265,7 +2265,9 @@ vm_map_copy_entry(
}
vm_object_reference(src_object);
+ vm_object_lock(src_object);
vm_object_clear_flag(src_object, OBJ_ONEMAPPING);
+ 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);
@@ -2355,7 +2357,9 @@ vmspace_fork(struct vmspace *vm1)
vm_object_deallocate(object);
object = old_entry->object.vm_object;
}
+ vm_object_lock(object);
vm_object_clear_flag(object, OBJ_ONEMAPPING);
+ vm_object_unlock(object);
/*
* Clone the entry, referencing the shared object.
OpenPOWER on IntegriCloud