aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2010-05-03 17:55:32 +0000
committerAlan Cox <alc@FreeBSD.org>2010-05-03 17:55:32 +0000
commit2d5d7f7f61f2217db46e1f9673aecc111d651df9 (patch)
treebf64d39c531661a5dabb333f14c0d775473a06f2
parent451033a48ac5930e486f46db2235bd01f9eca9c3 (diff)
downloadsrc-2d5d7f7f61f2217db46e1f9673aecc111d651df9.tar.gz
src-2d5d7f7f61f2217db46e1f9673aecc111d651df9.zip
Acquire the page lock around vm_page_wire() in vm_page_grab().
Assert that the page lock is held in vm_page_wire().
Notes
Notes: svn path=/head/; revision=207577
-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 acec3b7263b0..e18e7ba1b3bd 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);