Date: Thu, 15 Aug 2013 11:01:26 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254362 - head/sys/vm Message-ID: <201308151101.r7FB1QjP083789@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Thu Aug 15 11:01:25 2013 New Revision: 254362 URL: http://svnweb.freebsd.org/changeset/base/254362 Log: On the recovery path for vm_page_alloc(), if a page had been requested wired, unwind back the wiring bits otherwise we can end up freeing a page that is considered wired. Sponsored by: EMC / Isilon storage division Reported by: alc Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Aug 15 10:38:10 2013 (r254361) +++ head/sys/vm/vm_page.c Thu Aug 15 11:01:25 2013 (r254362) @@ -1611,6 +1611,10 @@ vm_page_alloc(vm_object_t object, vm_pin if (vp != NULL) vdrop(vp); pagedaemon_wakeup(); + if (req & VM_ALLOC_WIRED) { + atomic_subtract_int(&cnt.v_wire_count, 1); + m->wire_count = 0; + } m->object = NULL; vm_page_free(m); return (NULL); @@ -1806,8 +1810,13 @@ retry: &deferred_vdrop_list); if (vm_paging_needed()) pagedaemon_wakeup(); + if ((req & VM_ALLOC_WIRED) != 0) + atomic_subtract_int(&cnt.v_wire_count, + npages); for (m_tmp = m, m = m_ret; m < &m_ret[npages]; m++) { + if ((req & VM_ALLOC_WIRED) != 0) + m->wire_count = 0; if (m >= m_tmp) m->object = NULL; vm_page_free(m);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308151101.r7FB1QjP083789>