From owner-svn-src-head@FreeBSD.ORG Wed Oct 9 18:43:30 2013 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 ESMTP id 79892CD5; Wed, 9 Oct 2013 18:43:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) 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 669C02C81; Wed, 9 Oct 2013 18:43:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r99IhUIb053739; Wed, 9 Oct 2013 18:43:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r99IhUx9053738; Wed, 9 Oct 2013 18:43:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201310091843.r99IhUx9053738@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 9 Oct 2013 18:43:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256211 - head/sys/kern 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.14 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: Wed, 09 Oct 2013 18:43:30 -0000 Author: kib Date: Wed Oct 9 18:43:29 2013 New Revision: 256211 URL: http://svnweb.freebsd.org/changeset/base/256211 Log: Do not flush buffers when the v_object of the passed vnode does not really belong to it. Such vnodes, with the pointers to other vnodes v_objects, are typically instantiated by the bypass filesystems. Invalidating mappings of other vnode pages and the pages is wrong, since reclamation of the upper vnode does not imply that lower vnode is reclaimed too. One of the consequences of the improper reclamation was destruction of the wired mappings of the lower vnode pages, triggering miscellaneous assertions in the VM system. Reported by: John Marshall Tested by: John Marshall , pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Approved by: re (gjb) Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Oct 9 18:41:35 2013 (r256210) +++ head/sys/kern/vfs_subr.c Wed Oct 9 18:43:29 2013 (r256211) @@ -1315,6 +1315,8 @@ vinvalbuf(struct vnode *vp, int flags, i CTR3(KTR_VFS, "%s: vp %p with flags %d", __func__, vp, flags); ASSERT_VOP_LOCKED(vp, "vinvalbuf"); + if (vp->v_object != NULL && vp->v_object->handle != vp) + return (0); return (bufobj_invalbuf(&vp->v_bufobj, flags, slpflag, slptimeo)); }