summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-05-03 17:55:32 +0000
committeralc <alc@FreeBSD.org>2010-05-03 17:55:32 +0000
commit33bb944de87dcb5fa7c7c5c260ca36e8b5ad739f (patch)
treebf64d39c531661a5dabb333f14c0d775473a06f2 /sys/vm
parent0ec9744723453231e9fd60b03b8c68d4ce625cf7 (diff)
downloadFreeBSD-src-33bb944de87dcb5fa7c7c5c260ca36e8b5ad739f.zip
FreeBSD-src-33bb944de87dcb5fa7c7c5c260ca36e8b5ad739f.tar.gz
Acquire the page lock around vm_page_wire() in vm_page_grab().
Assert that the page lock is held in vm_page_wire().
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_page.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index acec3b7..e18e7ba 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1544,6 +1544,7 @@ vm_page_wire(vm_page_t m)
* it is already off the queues).
*/
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+ vm_page_lock_assert(m, MA_OWNED);
if (m->flags & PG_FICTITIOUS)
return;
if (m->wire_count == 0) {
@@ -1914,9 +1915,11 @@ retrylookup:
goto retrylookup;
} else {
if ((allocflags & VM_ALLOC_WIRED) != 0) {
+ vm_page_lock(m);
vm_page_lock_queues();
vm_page_wire(m);
vm_page_unlock_queues();
+ vm_page_unlock(m);
}
if ((allocflags & VM_ALLOC_NOBUSY) == 0)
vm_page_busy(m);
OpenPOWER on IntegriCloud