From 482e860dda7cab14715c1f17c1b888d5c5591e90 Mon Sep 17 00:00:00 2001 From: alc Date: Mon, 28 Apr 2003 06:11:32 +0000 Subject: uma_zone_set_obj() must perform VM_OBJECT_LOCK_INIT() if the caller provides storage for the vm_object. --- sys/vm/uma_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index a51c8ba..a27794b 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; -- cgit v1.1