From owner-svn-src-all@FreeBSD.ORG Fri Dec 13 06:25:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45733DE2; Fri, 13 Dec 2013 06:25:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2940616E4; Fri, 13 Dec 2013 06:25:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBD6PikT087312; Fri, 13 Dec 2013 06:25:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBD6PikL087311; Fri, 13 Dec 2013 06:25:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201312130625.rBD6PikL087311@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 13 Dec 2013 06:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r259298 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 06:25:44 -0000 Author: kib Date: Fri Dec 13 06:25:43 2013 New Revision: 259298 URL: http://svnweb.freebsd.org/changeset/base/259298 Log: MFC r258366: Add assertions to cover all places in the wiring and unwiring code where MAP_ENTRY_IN_TRANSITION is set or cleared. Modified: stable/9/sys/vm/vm_map.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_map.c ============================================================================== --- stable/9/sys/vm/vm_map.c Fri Dec 13 06:25:08 2013 (r259297) +++ stable/9/sys/vm/vm_map.c Fri Dec 13 06:25:43 2013 (r259298) @@ -2289,6 +2289,9 @@ vm_map_unwire(vm_map_t map, vm_offset_t * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 && + entry->wiring_thread == NULL, + ("owned map entry %p", entry)); entry->eflags |= MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = curthread; /* @@ -2357,7 +2360,9 @@ done: } } KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0, - ("vm_map_unwire: in-transition flag missing")); + ("vm_map_unwire: in-transition flag missing %p", entry)); + KASSERT(entry->wiring_thread == curthread, + ("vm_map_unwire: alien wire %p", entry)); entry->eflags &= ~MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = NULL; if (entry->eflags & MAP_ENTRY_NEEDS_WAKEUP) { @@ -2457,6 +2462,9 @@ vm_map_wire(vm_map_t map, vm_offset_t st * Mark the entry in case the map lock is released. (See * above.) */ + KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 && + entry->wiring_thread == NULL, + ("owned map entry %p", entry)); entry->eflags |= MAP_ENTRY_IN_TRANSITION; entry->wiring_thread = curthread; if ((entry->protection & (VM_PROT_READ | VM_PROT_EXECUTE)) == 0