- textvp may have been from a different mountpoint than ndp->ni_vp and

we may need to acquire giant to vrele it.

Found by:	mjacob
MFC After:	3 days
This commit is contained in:
Jeff Roberson 2006-02-02 08:39:39 +00:00
parent 7aa9d01bf4
commit 68ce4375c4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155205

View file

@ -723,8 +723,13 @@ do_execve(td, args, mac_p)
/*
* Handle deferred decrement of ref counts.
*/
if (textvp != NULL)
if (textvp != NULL) {
int tvfslocked;
tvfslocked = VFS_LOCK_GIANT(textvp->v_mount);
vrele(textvp);
VFS_UNLOCK_GIANT(tvfslocked);
}
if (ndp->ni_vp && error != 0)
vrele(ndp->ni_vp);
#ifdef KTRACE