PERFORCE change 19572 for review

Robert Watson rwatson at freebsd.org
Fri Oct 18 19:32:15 GMT 2002


http://perforce.freebsd.org/chv.cgi?CH=19572

Change 19572 by rwatson at rwatson_tislabs on 2002/10/18 12:31:12

	Release vnode locks on from directory, vnode even if there is
	a MAC failure, preventing vnode lock leakage.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/kern/vfs_syscalls.c#92 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/kern/vfs_syscalls.c#92 (text+ko) ====

@@ -2761,13 +2761,13 @@
 #ifdef MAC
 	error = mac_check_vnode_rename_from(td->td_ucred, fromnd.ni_dvp, fvp,
 	    &fromnd.ni_cnd);
+	NDFREE(&fromnd, NDF_ONLY_UNLOCK);
 	if (error) {
 		NDFREE(&fromnd, NDF_ONLY_PNBUF);
 		vrele(fromnd.ni_dvp);
 		vrele(fvp);
 		goto out1;
 	}
-	NDFREE(&fromnd, NDF_ONLY_UNLOCK);
 #endif
 	if ((error = vn_start_write(fvp, &mp, V_WAIT | PCATCH)) != 0) {
 		NDFREE(&fromnd, NDF_ONLY_PNBUF);
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list