(8.18.1/8.18.1) with ESMTP id 59D0UEbl046552; Mon, 13 Oct 2025 00:30:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59D0UEcH046545; Mon, 13 Oct 2025 00:30:14 GMT (envelope-from git) Date: Mon, 13 Oct 2025 00:30:14 GMT Message-Id: <202510130030.59D0UEcH046545@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d1cdb4a087e6 - stable/14 - vm_fault: assert that first_m is xbusy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d1cdb4a087e69e1515a855a928ced8a18f9b75f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d1cdb4a087e69e1515a855a928ced8a18f9b75f9 commit d1cdb4a087e69e1515a855a928ced8a18f9b75f9 Author: Konstantin Belousov AuthorDate: 2025-08-05 15:46:56 +0000 Commit: Konstantin Belousov CommitDate: 2025-10-13 00:23:46 +0000 vm_fault: assert that first_m is xbusy (cherry picked from commit a38483fa2b3a26414d3409b12dd35ac406c44cea) --- sys/vm/vm_fault.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index f6e75629864e..aad112a652ed 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1785,6 +1785,11 @@ found: /* * A valid page has been found and busied. The object lock * must no longer be held if the page was busied. + * + * Regardless of the busy state of fs.m, fs.first_m is always + * exclusively busied after the first iteration of the loop + * calling vm_fault_object(). This is an ordering point for + * the parallel faults occuring in on the same page. */ vm_page_assert_busied(fs.m); VM_OBJECT_ASSERT_UNLOCKED(fs.object); @@ -1887,6 +1892,9 @@ found: (*fs.m_hold) = fs.m; vm_page_wire(fs.m); } + + KASSERT(fs.first_object == fs.object || vm_page_xbusied(fs.first_m), + ("first_m must be xbusy")); if (vm_page_xbusied(fs.m)) vm_page_xunbusy(fs.m); else