From owner-svn-src-all@FreeBSD.ORG Fri Apr 3 06:06:01 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 40A99106564A; Fri, 3 Apr 2009 06:06:01 +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 E25E58FC08; Fri, 3 Apr 2009 06:06:00 +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 62DEA7F381; Fri, 3 Apr 2009 10:05:59 +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 1717780514; Fri, 03 Apr 2009 10:05:59 +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 n3365x2E024852; Fri, 3 Apr 2009 10:05:59 +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 n3365rUo024851; Fri, 3 Apr 2009 10:05:54 +0400 (MSD) (envelope-from dchagin) Date: Fri, 3 Apr 2009 10:05:53 +0400 From: Chagin Dmitry To: Peter Wemm Message-ID: <20090403060553.GA20624@dchagin.static.corbina.ru> References: <200904022116.n32LGK81076210@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: <200904022116.n32LGK81076210@svn.freebsd.org> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org 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 06:06:01 -0000 --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 vn_vptocnp() consumers expects what in case of error returns w/o CACHE_RLOCK held. so you need something like: 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 *buf, u= _int *buflen) vdrop(*vp); VFS_UNLOCK_GIANT(vfslocked); if (error) { - CACHE_RLOCK(); numfullpathfail2++; return (error); } *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); --=20 Have fun! chd --dDRMvlgZJXvWKvBx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAknVp0EACgkQ0t2Tb3OO/O1I3ACfZNKJ+Ofv3xiiHZYggkO0zsbz QmsAnjdOvbJ7eaMKK3b9vkrngmdU5y3e =BWKj -----END PGP SIGNATURE----- --dDRMvlgZJXvWKvBx--