aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/uma_core.c
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2003-04-28 06:11:32 +0000
committerAlan Cox <alc@FreeBSD.org>2003-04-28 06:11:32 +0000
commit82774d80407c1039b593fe88f605b515cc08445d (patch)
treec45e4b863414b2d8b4e2acb3a5bf3614c5bf08f5 /sys/vm/uma_core.c
parentd8e7c92c9eacd977badff48b7612617a4e0b4c3e (diff)
downloadsrc-82774d80407c1039b593fe88f605b515cc08445d.tar.gz
src-82774d80407c1039b593fe88f605b515cc08445d.zip
uma_zone_set_obj() must perform VM_OBJECT_LOCK_INIT() if the caller
provides storage for the vm_object.
Notes
Notes: svn path=/head/; revision=114149
Diffstat (limited to 'sys/vm/uma_core.c')
-rw-r--r--sys/vm/uma_core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index a51c8ba1ed13..a27794beef7b 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -1941,10 +1941,11 @@ uma_zone_set_obj(uma_zone_t zone, struct vm_object *obj, int count)
if (obj == NULL)
obj = vm_object_allocate(OBJT_DEFAULT,
pages);
- else
+ else {
+ VM_OBJECT_LOCK_INIT(obj);
_vm_object_allocate(OBJT_DEFAULT,
pages, obj);
-
+ }
ZONE_LOCK(zone);
zone->uz_kva = kva;
zone->uz_obj = obj;