From owner-svn-src-stable-11@freebsd.org Sun Nov 24 06:54:17 2019 Return-Path: Delivered-To: svn-src-stable-11@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E24861CE3C1; Sun, 24 Nov 2019 06:54:17 +0000 (UTC) (envelope-from dougm@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47LLVx5gktz3Cbn; Sun, 24 Nov 2019 06:54:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A6105206D9; Sun, 24 Nov 2019 06:54:17 +0000 (UTC) (envelope-from dougm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAO6sHu1052220; Sun, 24 Nov 2019 06:54:17 GMT (envelope-from dougm@FreeBSD.org) Received: (from dougm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO6sHVq052219; Sun, 24 Nov 2019 06:54:17 GMT (envelope-from dougm@FreeBSD.org) Message-Id: <201911240654.xAO6sHVq052219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dougm set sender to dougm@FreeBSD.org using -f From: Doug Moore Date: Sun, 24 Nov 2019 06:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r355049 - stable/11/sys/vm X-SVN-Group: stable-11 X-SVN-Commit-Author: dougm X-SVN-Commit-Paths: stable/11/sys/vm X-SVN-Commit-Revision: 355049 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 06:54:17 -0000 Author: dougm Date: Sun Nov 24 06:54:17 2019 New Revision: 355049 URL: https://svnweb.freebsd.org/changeset/base/355049 Log: MFC r354785 The loop in vm_map_protect that verifies that all transition map entries are stabilized, repeatedly verifies the same entry. Check each entry in turn. Modified: stable/11/sys/vm/vm_map.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_map.c ============================================================================== --- stable/11/sys/vm/vm_map.c Sun Nov 24 06:46:49 2019 (r355048) +++ stable/11/sys/vm/vm_map.c Sun Nov 24 06:54:17 2019 (r355049) @@ -2041,17 +2041,16 @@ again: vm_map_unlock(map); return (KERN_PROTECTION_FAILURE); } - if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0) - in_tran = entry; + if ((current->eflags & MAP_ENTRY_IN_TRANSITION) != 0) + in_tran = current; } /* - * Postpone the operation until all in transition map entries - * are stabilized. In-transition entry might already have its - * pages wired and wired_count incremented, but - * MAP_ENTRY_USER_WIRED flag not yet set, and visible to other - * threads because the map lock is dropped. In this case we - * would miss our call to vm_fault_copy_entry(). + * Postpone the operation until all in-transition map entries have + * stabilized. An in-transition entry might already have its pages + * wired and wired_count incremented, but not yet have its + * MAP_ENTRY_USER_WIRED flag set. In which case, we would fail to call + * vm_fault_copy_entry() in the final loop below. */ if (in_tran != NULL) { in_tran->eflags |= MAP_ENTRY_NEEDS_WAKEUP;