summaryrefslogtreecommitdiffstats
path: root/sys/security
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2008-05-21 13:59:05 +0000
committerrwatson <rwatson@FreeBSD.org>2008-05-21 13:59:05 +0000
commit16646c6d680579389227ee7d13bf6912f484435e (patch)
treeca87a5e55f7cbe1a3795037c8601f0b6f1049bd6 /sys/security
parent375312ef89039b96cf27030ff5c77093806198b7 (diff)
downloadFreeBSD-src-16646c6d680579389227ee7d13bf6912f484435e.zip
FreeBSD-src-16646c6d680579389227ee7d13bf6912f484435e.tar.gz
Don't use LK_DRAIN before calling VOP_FSYNC() in the two further
panic cases for audit trail failure -- this doesn't contribute anything, and might arguably be wrong. MFC after: 1 week Requested by: attilio
Diffstat (limited to 'sys/security')
-rw-r--r--sys/security/audit/audit_worker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/security/audit/audit_worker.c b/sys/security/audit/audit_worker.c
index 96068b5..dd37c06 100644
--- a/sys/security/audit/audit_worker.c
+++ b/sys/security/audit/audit_worker.c
@@ -259,7 +259,7 @@ fail_enospc:
* space, or ENOSPC returned by the vnode write call.
*/
if (audit_fail_stop) {
- VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK);
+ VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_FSYNC(vp, MNT_WAIT, curthread);
VOP_UNLOCK(vp, 0);
panic("Audit log space exhausted and fail-stop set.");
@@ -274,7 +274,7 @@ fail:
* lost, which may require an immediate system halt.
*/
if (audit_panic_on_write_fail) {
- VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK);
+ VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_FSYNC(vp, MNT_WAIT, curthread);
VOP_UNLOCK(vp, 0);
panic("audit_worker: write error %d\n", error);
OpenPOWER on IntegriCloud