Date: Mon, 27 Jul 2020 14:25:11 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r363607 - head/sys/vm Message-ID: <202007271425.06REPBtv075771@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Jul 27 14:25:10 2020 New Revision: 363607 URL: https://svnweb.freebsd.org/changeset/base/363607 Log: vm_page_free_invalid(): Relax the xbusy assertion. vm_page_assert_xbusied() asserts that the busying thread is the current thread. For some uses of vm_page_free_invalid() (e.g., error handling in vnode_pager_generic_getpages_done()), this condition might not hold. Reported by: Jenkins via trasz Reviewed by: chs, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25828 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Mon Jul 27 14:16:27 2020 (r363606) +++ head/sys/vm/vm_page.c Mon Jul 27 14:25:10 2020 (r363607) @@ -1371,9 +1371,14 @@ vm_page_free_invalid(vm_page_t m) KASSERT(vm_page_none_valid(m), ("page %p is valid", m)); KASSERT(!pmap_page_is_mapped(m), ("page %p is mapped", m)); - vm_page_assert_xbusied(m); KASSERT(m->object != NULL, ("page %p has no object", m)); VM_OBJECT_ASSERT_WLOCKED(m->object); + + /* + * We may be attempting to free the page as part of the handling for an + * I/O error, in which case the page was xbusied by a different thread. + */ + vm_page_xbusy_claim(m); /* * If someone has wired this page while the object lock
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007271425.06REPBtv075771>