From nobody Mon Dec 13 13:28:47 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F2AB018F4F18; Mon, 13 Dec 2021 13:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JCMm001Ytz4s4j; Mon, 13 Dec 2021 13:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D3AD2157D3; Mon, 13 Dec 2021 13:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BDDSlA2000832; Mon, 13 Dec 2021 13:28:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BDDSlO2000831; Mon, 13 Dec 2021 13:28:47 GMT (envelope-from git) Date: Mon, 13 Dec 2021 13:28:47 GMT Message-Id: <202112131328.1BDDSlO2000831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e302ae7756c8 - stable/13 - vm_page: Tighten the object lock assertion in vm_page_invalid() 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e302ae7756c87fe20f04578c8d2e126c17a9fa1a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639402128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XJU0hd+DXVUTW52APF1Q2KUcFd6/fcM8otpX8r+2WPA=; b=pQTjP7Zjc/kDTODtkW2rl+uJX90JBh17kCFdkoxMy5bubJS/b9dmhICtboVAMm3odChdT1 SM9dkPK3nRIwNZMNLC/cLJKJLm3NdSbnRTYXRo3rwcM+6u5cbPwL7SBrVd73VXQssKG6NM pUZ14q/QUJ0RBMB7f1M726FYF6iIfT3Uprl2c1vmC+/07SW+ObitIVY01SkguYgOXR9p2K A0BlWqKzVSfXlcmBc4iAxX+91KnMZXhivLt/yRPga0dN3aXhsvH9vCPN5Nt5vIQQkgUe4z XDrXwsIbawnyJThYKfIrOWB/++sFszU5eXzrmuKHhzaOpA04JkIANlGMchc6fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639402128; a=rsa-sha256; cv=none; b=uvSam47TtTZg3i4y/cmoESaH63+7MPpQTdCvDNCcXDnRSGYCF/znwX5L120UEf0qCf1+UH /962JmQWH+4+zXAP++tUHpUYKHHk/nDTMlX3HTNnKzrCUV6PwP5gcN2KNaCNta+Gz8SWXl LmZJCPM0pmwdfKtPY91VrjWO7CSG/XiCxWF/uEnDyiuQZBeKW4L3saT+P/XDruCgqdTj3H GUAocQgQzk6t+ciBV2D550DHiYLAa8wyNmOf3RjONlEo3X4VZWaXKoUEe9TIGSuxs/YEuV EznI8pONIhR32OTEPISaIw4scDvN/jIbX6TQ/G1PA+Wp/9BSE2gnLs4G9uxuRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e302ae7756c87fe20f04578c8d2e126c17a9fa1a commit e302ae7756c87fe20f04578c8d2e126c17a9fa1a Author: Mark Johnston AuthorDate: 2021-12-05 15:39:58 +0000 Commit: Mark Johnston CommitDate: 2021-12-13 13:26:34 +0000 vm_page: Tighten the object lock assertion in vm_page_invalid() A page must not become invalid while vm_fault_soft_fast() is attempting to map unbusied pages for reading. Note that all callers hold the object write lock already, and vm_page_set_invalid() asserts the object write lock. Reviewed by: kib Sponsored by: The FreeBSD Foundation (cherry picked from commit 39a7396f5d0c3eac4401229e1b24fb8b89efc862) --- sys/vm/vm_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 74c03ed3a21b..6cdde80bdb8b 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -5288,7 +5288,7 @@ vm_page_invalid(vm_page_t m) { vm_page_assert_busied(m); - VM_OBJECT_ASSERT_LOCKED(m->object); + VM_OBJECT_ASSERT_WLOCKED(m->object); MPASS(!pmap_page_is_mapped(m)); if (vm_page_xbusied(m))