summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-04-19 00:30:36 +0000
committeralc <alc@FreeBSD.org>2003-04-19 00:30:36 +0000
commit0086837cd46af4830e7d10a7e4b4c1cca4b87d9f (patch)
treef67a5afa76c3d0c07d50819ee5d2b56a667fa53b /sys/vm
parentf1b1ca3a925381f4d2923638e42a0e79fe036e26 (diff)
downloadFreeBSD-src-0086837cd46af4830e7d10a7e4b4c1cca4b87d9f.zip
FreeBSD-src-0086837cd46af4830e7d10a7e4b4c1cca4b87d9f.tar.gz
Lock the vm_object in obj_alloc().
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/uma_core.c2
1 files changed, 2 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud