svn commit: r190655 - head/sys/kern

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Apr 3 15:26:19 PDT 2009


On Thu, 2 Apr 2009 21:16:20 +0000 (UTC), Peter Wemm <peter at FreeBSD.org> wrote:
> Author: peter
> Date: Thu Apr  2 21:16:20 2009
> New Revision: 190655
> URL: http://svn.freebsd.org/changeset/base/190655
>
> 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.
>
> Modified:
>   head/sys/kern/vfs_cache.c
>
> Modified: head/sys/kern/vfs_cache.c
> ==============================================================================
> --- head/sys/kern/vfs_cache.c	Thu Apr  2 19:27:56 2009	(r190654)
> +++ head/sys/kern/vfs_cache.c	Thu Apr  2 21:16:20 2009	(r190655)
> @@ -971,6 +971,7 @@ vn_vptocnp(struct vnode **vp, char **bp,
>  	vdrop(*vp);
>  	VFS_UNLOCK_GIANT(vfslocked);
>  	if (error) {
> +		CACHE_RLOCK();
>  		numfullpathfail2++;
>  		return (error);
>  	}
> @@ -979,7 +980,6 @@ vn_vptocnp(struct vnode **vp, char **bp,
>  	CACHE_RLOCK();
>  	if ((*vp)->v_iflag & VI_DOOMED) {
>  		/* forced unmount */
> -		CACHE_RUNLOCK();
>  		vdrop(*vp);
>  		return (ENOENT);
>  	}

This seems to trigger panics for nullfs mounts:

System call __getcwd returning with the following locks held:
shared rw Name Cache (Name Cache) r = 0 (0xc0ba245c) locked @ /usr/src/sys/kern/vfs_cache.c:980
panic: witness_warn



More information about the svn-src-head mailing list