Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Sep 2010 22:50:02 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-fs@FreeBSD.org
Subject:   Re: kern/150143: commit references a PR
Message-ID:  <201009072250.o87Mo2KY059556@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/150143; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/150143: commit references a PR
Date: Tue,  7 Sep 2010 22:41:09 +0000 (UTC)

 Author: ivoras
 Date: Tue Sep  7 22:40:45 2010
 New Revision: 212305
 URL: http://svn.freebsd.org/changeset/base/212305
 
 Log:
   Avoid "Entry can disappear before we lock fdvp" panic.
   
   PR:		150143
   Submitted by:	Gleb Kurtsou <gk at FreeBSD.org>
   Pretty sure it won't blow up: mckusick
   MFC after:	2 weeks
 
 Modified:
   head/sys/fs/tmpfs/tmpfs_vnops.c
 
 Modified: head/sys/fs/tmpfs/tmpfs_vnops.c
 ==============================================================================
 --- head/sys/fs/tmpfs/tmpfs_vnops.c	Tue Sep  7 21:28:45 2010	(r212304)
 +++ head/sys/fs/tmpfs/tmpfs_vnops.c	Tue Sep  7 22:40:45 2010	(r212305)
 @@ -981,10 +981,14 @@ tmpfs_rename(struct vop_rename_args *v)
  	fnode = VP_TO_TMPFS_NODE(fvp);
  	de = tmpfs_dir_lookup(fdnode, fnode, fcnp);
  
 -	/* Avoid manipulating '.' and '..' entries. */
 +	/* Entry can disappear before we lock fdvp,
 +	 * also avoid manipulating '.' and '..' entries. */
  	if (de == NULL) {
 -		MPASS(fvp->v_type == VDIR);
 -		error = EINVAL;
 +		if ((fcnp->cn_flags & ISDOTDOT) != 0 ||
 +		    (fcnp->cn_namelen == 1 && fcnp->cn_nameptr[0] == '.'))
 +			error = EINVAL;
 +		else
 +			error = ENOENT;
  		goto out_locked;
  	}
  	MPASS(de->td_node == fnode);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009072250.o87Mo2KY059556>