From owner-svn-src-all@FreeBSD.ORG Sun Oct 11 00:27:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75A341065676; Sun, 11 Oct 2009 00:27:40 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yx0-f171.google.com (mail-yx0-f171.google.com [209.85.210.171]) by mx1.freebsd.org (Postfix) with ESMTP id EDD498FC0A; Sun, 11 Oct 2009 00:27:39 +0000 (UTC) Received: by yxe1 with SMTP id 1so1164468yxe.3 for ; Sat, 10 Oct 2009 17:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=0AqW6vnx9D7g624aWYgsZMP1WXnIBRfE/m/f8YTg4to=; b=sX79OJbMbE7sZtkoMtqKEvKSKTpH1vroA5nMsxXpGySNE3zGDr6QgXyJVghpk5QCX/ HvUOpECVUKuCs5ULz1kbrulm+cvDyt2OFOjRUpU/yTlhYSOPwl0P+mZ8CRwB3rrj3PTL Pe1uXUpXxPQTXvtILYBd4qY3y3AWO+U/54LNM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=qIxUXEck6BGvavn0xikS1D6rtPpGw03Gz+NQwae5TSirSznR8kfInEpBthRgsF2y41 6pcRer7E6IfiihvKY73Vqp3WSiR9xw4kZVpuhjjqygB2QsUkIYLODXZQ9wGIl+qmmG67 SKJWGQxfLga4x2Gp3UOtB21auSpDSPd4TIALM= MIME-Version: 1.0 Received: by 10.90.61.31 with SMTP id j31mr2074547aga.3.1255220859142; Sat, 10 Oct 2009 17:27:39 -0700 (PDT) In-Reply-To: <200910081128.n98BSWCd021500@svn.freebsd.org> References: <200910081128.n98BSWCd021500@svn.freebsd.org> Date: Sun, 11 Oct 2009 02:27:39 +0200 Message-ID: <6101e8c40910101727t632d295ercccde04db34efac3@mail.gmail.com> From: Oliver Pinter To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r197855 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 11 Oct 2009 00:27:40 -0000 this like commit MFC to 7-STABLE? On 10/8/09, Konstantin Belousov wrote: > Author: kib > Date: Thu Oct 8 11:28:32 2009 > New Revision: 197855 > URL: http://svn.freebsd.org/changeset/base/197855 > > Log: > MFC r197662: > Do not dereference vp->v_mount without holding vnode lock and checking > that the vnode is not reclaimed. > > Approved by: re (bz) > > Modified: > 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) > stable/8/sys/dev/xen/xenpci/ (props changed) > stable/8/sys/kern/uipc_syscalls.c > > Modified: stable/8/sys/kern/uipc_syscalls.c > ============================================================================== > --- stable/8/sys/kern/uipc_syscalls.c Thu Oct 8 11:07:15 2009 (r197854) > +++ stable/8/sys/kern/uipc_syscalls.c Thu Oct 8 11:28:32 2009 (r197855) > @@ -2085,9 +2085,11 @@ retry_space: > /* > * Get the page from backing store. > */ > - bsize = vp->v_mount->mnt_stat.f_iosize; > vfslocked = VFS_LOCK_GIANT(vp->v_mount); > - vn_lock(vp, LK_SHARED | LK_RETRY); > + error = vn_lock(vp, LK_SHARED); > + if (error != 0) > + goto after_read; > + bsize = vp->v_mount->mnt_stat.f_iosize; > > /* > * XXXMAC: Because we don't have fp->f_cred > @@ -2100,6 +2102,7 @@ retry_space: > IO_VMIO | ((MAXBSIZE / bsize) << IO_SEQSHIFT), > td->td_ucred, NOCRED, &resid, td); > VOP_UNLOCK(vp, 0); > + after_read: > VFS_UNLOCK_GIANT(vfslocked); > VM_OBJECT_LOCK(obj); > vm_page_io_finish(pg); > _______________________________________________ > svn-src-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-stable > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org" >