From nobody Sun Dec 05 15:52:40 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 1C65C18C531B; Sun, 5 Dec 2021 15:52:41 +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 4J6WKh654Pz3qJc; Sun, 5 Dec 2021 15:52:40 +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 B0C0D1AB31; Sun, 5 Dec 2021 15:52:40 +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 1B5FqeG6002311; Sun, 5 Dec 2021 15:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B5FqeTx002310; Sun, 5 Dec 2021 15:52:40 GMT (envelope-from git) Date: Sun, 5 Dec 2021 15:52:40 GMT Message-Id: <202112051552.1B5FqeTx002310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 39a7396f5d0c - main - 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/main X-Git-Reftype: branch X-Git-Commit: 39a7396f5d0c3eac4401229e1b24fb8b89efc862 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638719560; 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=aNoEL/ZjNK71TeK6WQc++wyo9F5Z8yByZiC/32omX24=; b=PkFSNMXidIOfwYsXO69opEDU/6maTbi7DsqyB7IwWyRNr/CYO9Dca1eUGhBtV7HSbCS7iV xNWcNp+DyeSYisX9ZYFMr1GNrKsVUQEuXQw1BvxvWY2/bzvvvD2gr+HC+ZQqdlUjFKArFO 8ja+ZGL9YhXpgMTLmakRv4bKfHBNDQietubCjwivgKtOIWQNfJC2ii8GLkfpkVOzxfa92B 5ZDBDGanhO2L637H1v+C+HfKbwztUAuY1nbmC8/5Llq3JxAlmKtJY1RhshfTUIXH1Ni+t0 dXuSqr6SIhJSIdnlGV9UQjPC9FsqPwtsQF1h7Ighy51Wuc57yz09t8uzEghTow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638719560; a=rsa-sha256; cv=none; b=ZXNFaKqrx2uP0yblb+HIVf0Tgoir/07K9ddUjv4Mlg2dYCvszY1BDbuksIk6EOyNOugpGj vCXTbcsmkMy0YUMrtGLY9tMHfspSzll/hVjzU58lur5trPvfqhc9mkY0ZoMsRP5TxkeBEb S3T9bFI3W27clQxF1oMYAdANJ9itwuudKzh6eg+hjYZbjJTAxA+5LAqywE/J5ZDN0pILte XMCoE8vykFpEuQNWS0Eylj5pvJNwnTunXVzPnYRIRXWTh7/c/oLyfRQkcJhAfqxBQ3HK4Q zec3q0HrkyCBsw216ETTWiT6fk6QSBUAaB5H2nrFmgp1vtqp7VkKTgt71P/h6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=39a7396f5d0c3eac4401229e1b24fb8b89efc862 commit 39a7396f5d0c3eac4401229e1b24fb8b89efc862 Author: Mark Johnston AuthorDate: 2021-12-05 15:39:58 +0000 Commit: Mark Johnston CommitDate: 2021-12-05 15:51:11 +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 MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33250 --- 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 28eb95d9fb33..f14a9330556b 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -5332,7 +5332,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))