Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jun 2009 16:44:42 +0000 (UTC)
From:      Joe Marcus Clarke <marcus@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193518 - head/sys/kern
Message-ID:  <200906051644.n55Gigtw031500@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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);



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