From bf7baa9eca71b921c9c18e1404b2da5c8a60c6da Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 21 May 2008 13:05:06 +0000 Subject: [PATCH] Don't use LK_DRAIN before calling VOP_FSYNC() in the panic case for audit trail failure -- this doesn't contribute anything, and might arguably be wrong. MFC after: 1 week Requested by: attilio --- sys/security/audit/audit_worker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/security/audit/audit_worker.c b/sys/security/audit/audit_worker.c index 5c5f2be9844..96068b55261 100644 --- a/sys/security/audit/audit_worker.c +++ b/sys/security/audit/audit_worker.c @@ -242,7 +242,7 @@ audit_record_write(struct vnode *vp, struct ucred *cred, void *data, */ if (audit_in_failure) { if (audit_q_len == 0 && audit_pre_q_len == 0) { - 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 store overflow; record queue drained."); -- 2.45.0