From kostikbel@gmail.com  Thu Mar 19 14:28:02 2009
Return-Path: <kostikbel@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CDE34106567A;
	Thu, 19 Mar 2009 14:28:02 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147])
	by mx1.freebsd.org (Postfix) with ESMTP id 582D08FC13;
	Thu, 19 Mar 2009 14:28:02 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua)
	by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.63 (FreeBSD))
	(envelope-from <kostikbel@gmail.com>)
	id 1LkIy5-000IfZ-Cb; Thu, 19 Mar 2009 16:11:33 +0200
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n2JEBUQj008942
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Thu, 19 Mar 2009 16:11:30 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n2JEBURa059756;
	Thu, 19 Mar 2009 16:11:30 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n2JEBUAY059752;
	Thu, 19 Mar 2009 16:11:30 +0200 (EET)
	(envelope-from kostikbel@gmail.com)
Message-Id: <20090319141129.GI7716@deviant.kiev.zoral.com.ua>
Date: Thu, 19 Mar 2009 16:11:30 +0200
From: Kostik Belousov <kostikbel@gmail.com>
To: bf <bf2006a@yahoo.com>
Cc: jhb@FreeBSD.org, ed@FreeBSD.org, kib@FreeBSD.org, marcus@FreeBSD.org,
        alc@FreeBSD.org, linimon@lonesome.com, bug-followup@FreeBSD.org,
        "O. Hartmann" <ohartman@zedat.fu-berlin.de>
In-Reply-To: <544918.31673.qm@web39104.mail.mud.yahoo.com>
Subject: Re: PRs kern/132620 and ports/132542
References: <544918.31673.qm@web39104.mail.mud.yahoo.com>

>Number:         132813
>Category:       kern
>Synopsis:       Re: PRs kern/132620 and ports/132542
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gavin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 19 14:30:01 UTC 2009
>Closed-Date:    Thu Apr 16 09:41:36 UTC 2009
>Last-Modified:  Thu Apr 16 09:41:36 UTC 2009
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 --9s922KAXlWjPfK/Q
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 I am not sure about this wide distribution list for the issue,
 I suggest you to trim it on the response, leaving only me and marcus.
 
 Please try the patch below.
 
 On Thu, Mar 19, 2009 at 04:55:39AM -0700, bf wrote:
 > No, John, you seem to be innocent ... at least in this case.=20
 > The offending code seems to be marcus@ and kib@'s new
 > VOP_VPTOCNP(9), either on it's own or in conjunction with other
 > recent changes.  After reverting r189539-40 and r189622, the
 > build error for devel/icu,  which is the most consistently
 > reproducible of the errors I have observed lately, no longer
 > occurs on amd64 or i386, with otherwise up-to-date kernels and
 > worlds.  Nor have any other of the problems resurfaced after
 > building ports on a tmpfs /tmp, which seems to be more
 > susceptible to these errors than ufs.  I haven't determined the
 > exact mechanism of the error.
 
 
 diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
 index cec1e33..7a70377 100644
 --- a/sys/kern/vfs_cache.c
 +++ b/sys/kern/vfs_cache.c
 @@ -947,6 +947,7 @@ vn_fullpath1(struct thread *td, struct vnode *vp, struc=
 t vnode *rdir,
  	if (vp->v_type !=3D VDIR) {
  		ncp =3D TAILQ_FIRST(&vp->v_cache_dst);
  		if (ncp !=3D NULL) {
 +			buflen -=3D ncp->nc_nlen - 1;
  			for (i =3D ncp->nc_nlen - 1; i >=3D 0 && bp > buf; i--)
  				*--bp =3D ncp->nc_name[i];
  			if (bp =3D=3D buf) {
 @@ -957,17 +958,16 @@ vn_fullpath1(struct thread *td, struct vnode *vp, str=
 uct vnode *rdir,
  			vp =3D ncp->nc_dvp;
  		} else {
  			error =3D vn_vptocnp(&vp, &bp, buf, &buflen);
 -			if (error) {
 +			if (error)
  				return (error);
 -			}
  		}
 -		*--bp =3D '/';
 -		buflen--;
 -		if (buflen < 0) {
 +		if (buflen <=3D 0) {
  			numfullpathfail4++;
  			CACHE_RUNLOCK();
  			return (ENOMEM);
  		}
 +		*--bp =3D '/';
 +		buflen--;
  		slash_prefixed =3D 1;
  	}
  	while (vp !=3D rdir && vp !=3D rootvnode) {
 @@ -1001,18 +1001,17 @@ vn_fullpath1(struct thread *td, struct vnode *vp, s=
 truct vnode *rdir,
  			vp =3D ncp->nc_dvp;
  		} else {
  			error =3D vn_vptocnp(&vp, &bp, buf, &buflen);
 -			if (error) {
 +			if (error)
  				break;
 -			}
  		}
 -		*--bp =3D '/';
 -		buflen--;
 -		if (buflen < 0) {
 +		if (buflen <=3D 0) {
  			numfullpathfail4++;
  			CACHE_RUNLOCK();
  			error =3D ENOMEM;
  			break;
  		}
 +		*--bp =3D '/';
 +		buflen--;
  		slash_prefixed =3D 1;
  	}
  	if (error)
 @@ -1022,9 +1021,8 @@ vn_fullpath1(struct thread *td, struct vnode *vp, str=
 uct vnode *rdir,
  			numfullpathfail4++;
  			CACHE_RUNLOCK();
  			return (ENOMEM);
 -		} else {
 +		} else
  			*--bp =3D '/';
 -		}
  	}
  	numfullpathfound++;
  	CACHE_RUNLOCK();
 
 --9s922KAXlWjPfK/Q
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (FreeBSD)
 
 iEYEARECAAYFAknCUpEACgkQC3+MBN1Mb4gn4gCgqw8q91lw2IphGOsvdL3aNYiG
 /0UAoOHVa7Yo0OCH+K0LZ+OcKcXVBD/q
 =Ajeb
 -----END PGP SIGNATURE-----
 
 --9s922KAXlWjPfK/Q--
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: gavin 
State-Changed-When: Thu Apr 16 09:40:50 UTC 2009 
State-Changed-Why:  
Misfiled followup for two PRs, both of which have since been committed 
and closed. 


Responsible-Changed-From-To: gnats-admin->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Thu Apr 16 09:40:50 UTC 2009 
Responsible-Changed-Why:  


http://www.freebsd.org/cgi/query-pr.cgi?pr=132813 
>Unformatted:
