From 0086837cd46af4830e7d10a7e4b4c1cca4b87d9f Mon Sep 17 00:00:00 2001 From: alc Date: Sat, 19 Apr 2003 00:30:36 +0000 Subject: Lock the vm_object in obj_alloc(). --- sys/vm/uma_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 08811a7..89dc746 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -835,8 +835,10 @@ obj_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) * This looks a little weird since we're getting one page at a time */ while (bytes > 0) { + VM_OBJECT_LOCK(zone->uz_obj); p = vm_page_alloc(zone->uz_obj, pages, VM_ALLOC_INTERRUPT); + VM_OBJECT_UNLOCK(zone->uz_obj); if (p == NULL) return (NULL); -- cgit v1.1