PERFORCE change 84049 for review
Robert Watson
rwatson at FreeBSD.org
Wed Sep 21 11:25:43 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=84049
Change 84049 by rwatson at rwatson_zoo on 2005/09/21 11:25:01
When committing audit records in audit_record_write(), conditionally
acquire Giant rather than asserting that the caller holds it, as
Giant is not needed for some file systems now.
Affected files ...
.. //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#34 edit
Differences ...
==== //depot/projects/trustedbsd/audit3/sys/security/audit/kern_audit.c#34 (text+ko) ====
@@ -355,11 +355,9 @@
struct au_record *bsm;
struct vattr vattr;
struct statfs *mnt_stat = &vp->v_mount->mnt_stat;
+ int vfslocked;
- /*
- * XXXAUDIT: In the world of MPSAFE VFS, this may not be necessary.
- */
- mtx_assert(&Giant, MA_OWNED);
+ vfslocked = VFS_LOCK_GIANT(vp->v_mount);
/*
* First, gather statistics on the audit log file and file system
@@ -546,6 +544,8 @@
panic("Audit store overflow; record queue drained.");
}
+ VFS_UNLOCK_GIANT(vfslocked);
+
return (ret);
}
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