svn commit: r193518 - head/sys/kern

Joe Marcus Clarke marcus at FreeBSD.org
Fri Jun 5 16:44:43 UTC 2009


Author: marcus (doc,ports committer)
Date: Fri Jun  5 16:44:42 2009
New Revision: 193518
URL: http://svn.freebsd.org/changeset/base/193518

Log:
  Unlock the cache lock before returning when we run out of buffer space
  trying to fill in the full path name.
  
  Reported by:	David Naylor <naylor.b.david at gmail.com>
  Approved by:	kib

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Fri Jun  5 16:43:47 2009	(r193517)
+++ head/sys/kern/vfs_cache.c	Fri Jun  5 16:44:42 2009	(r193518)
@@ -1140,8 +1140,10 @@ vn_fullpath1(struct thread *td, struct v
 		error = vn_vptocnp_locked(&vp, buf, &buflen);
 		if (error)
 			return (error);
-		if (buflen == 0)
+		if (buflen == 0) {
+			CACHE_RUNLOCK();
 			return (ENOMEM);
+		}
 		buf[--buflen] = '/';
 		slash_prefixed = 1;
 	}
@@ -1169,6 +1171,7 @@ vn_fullpath1(struct thread *td, struct v
 		if (error)
 			break;
 		if (buflen == 0) {
+			CACHE_RUNLOCK();
 			error = ENOMEM;
 			SDT_PROBE(vfs, namecache, fullpath, return, error,
 			    startvp, NULL, 0, 0);


More information about the svn-src-all mailing list