svn commit: r207412 - head/sys/vm
Kip Macy
kmacy at FreeBSD.org
Fri Apr 30 02:46:49 UTC 2010
Author: kmacy
Date: Fri Apr 30 02:46:49 2010
New Revision: 207412
URL: http://svn.freebsd.org/changeset/base/207412
Log:
don't allow unsynchronized free in vm_page_unhold
Modified:
head/sys/vm/vm_page.c
Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c Fri Apr 30 02:35:46 2010 (r207411)
+++ head/sys/vm/vm_page.c Fri Apr 30 02:46:49 2010 (r207412)
@@ -563,8 +563,11 @@ vm_page_unhold(vm_page_t mem)
vm_page_lock_assert(mem, MA_OWNED);
--mem->hold_count;
KASSERT(mem->hold_count >= 0, ("vm_page_unhold: hold count < 0!!!"));
- if (mem->hold_count == 0 && VM_PAGE_INQUEUE2(mem, PQ_HOLD))
+ if (mem->hold_count == 0 && VM_PAGE_INQUEUE2(mem, PQ_HOLD)) {
+ vm_page_lock_queues();
vm_page_free_toq(mem);
+ vm_page_unlock_queues();
+ }
}
/*
More information about the svn-src-head
mailing list