From owner-svn-src-head@FreeBSD.ORG Thu Jul 24 10:25:43 2014 Return-Path: Delivered-To: svn-src-head@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 06E8ABEE; Thu, 24 Jul 2014 10:25:43 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E86DE2F6F; Thu, 24 Jul 2014 10:25:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6OAPgZL053075; Thu, 24 Jul 2014 10:25:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6OAPgYq053074; Thu, 24 Jul 2014 10:25:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407241025.s6OAPgYq053074@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 24 Jul 2014 10:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269053 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 10:25:43 -0000 Author: kib Date: Thu Jul 24 10:25:42 2014 New Revision: 269053 URL: http://svnweb.freebsd.org/changeset/base/269053 Log: Correct assertion. The shadowing object cannot be tmpfs vm object, and tmpfs object cannot shadow. In other words, tmpfs vm object is always at the bottom of the shadow chain. Reported and tested by: bdrewery Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu Jul 24 10:14:51 2014 (r269052) +++ head/sys/vm/vm_object.c Thu Jul 24 10:25:42 2014 (r269053) @@ -559,8 +559,6 @@ vm_object_deallocate(vm_object_t object) (object->handle == NULL) && (object->type == OBJT_DEFAULT || object->type == OBJT_SWAP)) { - KASSERT((object->flags & OBJ_TMPFS_NODE) == 0, - ("shadowed tmpfs v_object %p", object)); vm_object_t robject; robject = LIST_FIRST(&object->shadow_head); @@ -568,6 +566,8 @@ vm_object_deallocate(vm_object_t object) ("vm_object_deallocate: ref_count: %d, shadow_count: %d", object->ref_count, object->shadow_count)); + KASSERT((robject->flags & OBJ_TMPFS_NODE) == 0, + ("shadowed tmpfs v_object %p", object)); if (!VM_OBJECT_TRYWLOCK(robject)) { /* * Avoid a potential deadlock. @@ -637,6 +637,8 @@ retry: doterm: temp = object->backing_object; if (temp != NULL) { + KASSERT((object->flags & OBJ_TMPFS_NODE) == 0, + ("shadowed tmpfs v_object 2 %p", object)); VM_OBJECT_WLOCK(temp); LIST_REMOVE(object, shadow_list); temp->shadow_count--;