Date: Fri, 30 Apr 2010 02:46:49 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r207412 - head/sys/vm Message-ID: <201004300246.o3U2knNj034862@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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(); + } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004300246.o3U2knNj034862>