From owner-svn-src-stable@FreeBSD.ORG Thu May 12 01:22:24 2011 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26D5C1065674; Thu, 12 May 2011 01:22:24 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 162298FC1A; Thu, 12 May 2011 01:22:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4C1MNw8013755; Thu, 12 May 2011 01:22:23 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4C1MNO0013753; Thu, 12 May 2011 01:22:23 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <201105120122.p4C1MNO0013753@svn.freebsd.org> From: Max Laier Date: Thu, 12 May 2011 01:22:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221795 - stable/8/sys/vm X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2011 01:22:24 -0000 Author: mlaier Date: Thu May 12 01:22:23 2011 New Revision: 221795 URL: http://svn.freebsd.org/changeset/base/221795 Log: MFH r221714: Another long standing vm bug found at Isilon: Fix a race between vm_object_collapse and vm_fault. Reviewed by: alc@ Modified: stable/8/sys/vm/vm_object.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/vm/vm_object.c ============================================================================== --- stable/8/sys/vm/vm_object.c Thu May 12 00:10:29 2011 (r221794) +++ stable/8/sys/vm/vm_object.c Thu May 12 01:22:23 2011 (r221795) @@ -1458,6 +1458,24 @@ vm_object_backing_scan(vm_object_t objec pp = vm_page_lookup(object, new_pindex); if ( + (op & OBSC_COLLAPSE_NOWAIT) != 0 && + (pp != NULL && pp->valid == 0) + ) { + /* + * The page in the parent is not (yet) valid. + * We don't know anything about the state of + * the original page. It might be mapped, + * so we must avoid the next if here. + * + * This is due to a race in vm_fault() where + * we must unbusy the original (backing_obj) + * page before we can (re)lock the parent. + * Hence we can get here. + */ + p = next; + continue; + } + if ( pp != NULL || vm_pager_has_page(object, new_pindex, NULL, NULL) ) {