Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2005 11:58:23 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 84051 for review
Message-ID:  <200509211158.j8LBwNUT044369@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=84051

Change 84051 by rwatson@rwatson_zoo on 2005/09/21 11:57:45

	Be less agressive about removing Giant around vn_close(), we're not
	quite there yet.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#36 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#36 (text+ko) ====

@@ -561,6 +561,7 @@
 	TAILQ_HEAD(, kaudit_record) ar_worklist;
 	struct kaudit_record *ar;
 	struct vnode *audit_vp, *old_vp;
+	int vfslocked;
 
 	struct ucred *audit_cred, *old_cred;
 	struct thread *audit_td;
@@ -605,8 +606,10 @@
 			if (old_vp != NULL) {
 				AUDIT_PRINTF(("Closing old audit file\n"));
 				mtx_unlock(&audit_mtx);
+				vfslocked = VFS_LOCK_GIANT(old_vp->v_mount);
 				vn_close(old_vp, audit_close_flags, old_cred,
 				    audit_td);
+				VFS_UNLOCK_GIANT(vfslocked);
 				crfree(old_cred);
 				mtx_lock(&audit_mtx);
 				old_cred = NULL;



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