PERFORCE change 90742 for review

Robert Watson rwatson at FreeBSD.org
Mon Jan 30 23:43:20 GMT 2006


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

Change 90742 by rwatson at rwatson_zoo on 2006/01/30 23:42:19

	Audit vnode information in fstatfs() after acquiring Giant, not
	before.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/kern/vfs_syscalls.c#21 edit

Differences ...

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

@@ -329,17 +329,16 @@
 	if (error)
 		return (error);
 
+	mp = fp->f_vnode->v_mount;
+	fdrop(fp, td);
+	if (mp == NULL)
+		return (EBADF);
+	mtx_lock(&Giant);
 #ifdef AUDIT
 	vn_lock(fp->f_vnode, LK_EXCLUSIVE | LK_RETRY, td);
 	AUDIT_ARG(vnode, fp->f_vnode, ARG_VNODE1);
 	VOP_UNLOCK(fp->f_vnode, 0, td);
 #endif
-
-	mp = fp->f_vnode->v_mount;
-	fdrop(fp, td);
-	if (mp == NULL)
-		return (EBADF);
-	mtx_lock(&Giant);
 #ifdef MAC
 	error = mac_check_mount_stat(td->td_ucred, mp);
 	if (error) {
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