Page MenuHomeFreeBSD

D50879.id157109.diff
No OneTemporary

D50879.id157109.diff

diff --git a/sys/security/audit/audit.c b/sys/security/audit/audit.c
--- a/sys/security/audit/audit.c
+++ b/sys/security/audit/audit.c
@@ -411,10 +411,6 @@
return (curthread->td_ar);
}
-/*
- * XXXAUDIT: Shouldn't there be logic here to sleep waiting on available
- * pre_q space, suspending the system call until there is room?
- */
struct kaudit_record *
audit_new(int event, struct thread *td)
{
@@ -430,6 +426,13 @@
mtx_lock(&audit_mtx);
audit_pre_q_len++;
+
+ /*
+ * Constrain the number of committed audit records based on
+ * the configurable parameter.
+ */
+ while (audit_q_len >= audit_qctrl.aq_hiwater)
+ cv_wait(&audit_watermark_cv, &audit_mtx);
mtx_unlock(&audit_mtx);
return (ar);
@@ -565,13 +568,6 @@
return;
}
- /*
- * Constrain the number of committed audit records based on the
- * configurable parameter.
- */
- while (audit_q_len >= audit_qctrl.aq_hiwater)
- cv_wait(&audit_watermark_cv, &audit_mtx);
-
TAILQ_INSERT_TAIL(&audit_q, ar, k_q);
audit_q_len++;
audit_pre_q_len--;

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 2, 4:58 PM (16 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30730512
Default Alt Text
D50879.id157109.diff (1 KB)

Event Timeline