From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 12:35:29 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 3FDA71065686; Fri, 3 Apr 2009 12:35:29 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id DECC08FC17; Fri, 3 Apr 2009 12:35:28 +0000 (UTC) (envelope-from dchagin@dchagin.static.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id ECCE87D119; Fri, 3 Apr 2009 16:35:26 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from [10.208.17.3] (HELO dchagin.static.corbina.ru) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1718529313; Fri, 03 Apr 2009 16:35:26 +0400 Received: from dchagin.static.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.static.corbina.ru (8.14.3/8.14.3) with ESMTP id n33CZQSr058415; Fri, 3 Apr 2009 16:35:26 +0400 (MSD) (envelope-from dchagin@dchagin.static.corbina.ru) Received: (from dchagin@localhost) by dchagin.static.corbina.ru (8.14.3/8.14.3/Submit) id n33CZLOc058414; Fri, 3 Apr 2009 16:35:21 +0400 (MSD) (envelope-from dchagin) Date: Fri, 3 Apr 2009 16:35:21 +0400 From: Chagin Dmitry To: Kostik Belousov Message-ID: <20090403123521.GA58369@dchagin.static.corbina.ru> References: <200904022116.n32LGK81076210@svn.freebsd.org> <20090403060553.GA20624@dchagin.static.corbina.ru> <20090403094432.GQ31897@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: <20090403094432.GQ31897@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Peter Wemm Subject: Re: svn commit: r190655 - head/sys/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: Fri, 03 Apr 2009 12:35:29 -0000 --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 03, 2009 at 12:44:32PM +0300, Kostik Belousov wrote: > On Fri, Apr 03, 2009 at 10:05:53AM +0400, Chagin Dmitry wrote: > > On Thu, Apr 02, 2009 at 09:16:20PM +0000, Peter Wemm wrote: > > > Author: peter > > > Date: Thu Apr 2 21:16:20 2009 > > > New Revision: 190655 > > > URL: http://svn.freebsd.org/changeset/base/190655 > > >=20 > > > Log: > > > vn_vptocnp() unlocks the name cache and forgets to re-lock it before > > > returning in one error case, and mistakenly unlocks it for the > > > umount -f case. > > >=20 > >=20 > > vn_vptocnp() consumers expects what in case of error returns > > w/o CACHE_RLOCK held. so you need something like: > Yeah, I do not quite understand this commit. >=20 > >=20 > > diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c > > index ea19e13..b06a6c6 100644 > > --- a/sys/kern/vfs_cache.c > > +++ b/sys/kern/vfs_cache.c > > @@ -971,18 +971,17 @@ vn_vptocnp(struct vnode **vp, char **bp, char *bu= f, u_int *buflen) > > vdrop(*vp); > > VFS_UNLOCK_GIANT(vfslocked); > > if (error) { > > - CACHE_RLOCK(); > > numfullpathfail2++; > > return (error); > > } > Yes, this is reversal of the part of the r190655. >=20 > > *bp =3D buf + *buflen; > > *vp =3D dvp; > > - CACHE_RLOCK(); > > if ((*vp)->v_iflag & VI_DOOMED) { > > /* forced unmount */ > > vdrop(*vp); > > return (ENOENT); > > } > > + CACHE_RLOCK(); > > vdrop(*vp); > > =20 > > return (0); > There, r190655 should be reversed too, instead of doing what you do. > VI_DOOMED should be checked while cache is locked. >=20 whoops, it was fast hacking, therefore make universe panicked after rebase to r190655 thnx :) --=20 Have fun! chd --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAknWAogACgkQ0t2Tb3OO/O05IgCgnUd8Cnvi9gqx7RsdwRfovr23 Tm8AnRCSAZ66N0EMHac5VXt9VH02LTzC =uySt -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--