summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-06-08 07:14:30 +0000
committeralc <alc@FreeBSD.org>2003-06-08 07:14:30 +0000
commitcc48080643f557aaf52e67345661a65e6abe0d56 (patch)
treedf83b652d46410b4d1a9d9ced43ed00ba0a9aafd /sys/kern
parent8f0fd47b4758b04d7f636a51325b2df1a095be11 (diff)
downloadFreeBSD-src-cc48080643f557aaf52e67345661a65e6abe0d56.zip
FreeBSD-src-cc48080643f557aaf52e67345661a65e6abe0d56.tar.gz
Lock the vm object when performing vm_page_grab().
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index a453152..e9789b9 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -747,9 +747,9 @@ exec_map_first_page(imgp)
}
VOP_GETVOBJECT(imgp->vp, &object);
-
+ VM_OBJECT_LOCK(object);
ma[0] = vm_page_grab(object, 0, VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
-
+ VM_OBJECT_UNLOCK(object);
if ((ma[0]->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) {
initial_pagein = VM_INITIAL_PAGEIN;
if (initial_pagein > object->size)
OpenPOWER on IntegriCloud