svn commit: r189031 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb security/audit

Robert Watson rwatson at
Wed Feb 25 03:44:04 PST 2009

Author: rwatson
Date: Wed Feb 25 11:44:03 2009
New Revision: 189031

  Merge r186825 from head to stable/7:
    Do a lockless read of the audit pipe list before grabbing the audit pipe
    lock in order to avoid the lock acquire hit if the pipe list is very
    likely empty.
    Obtained from:        TrustedBSD Project
    Sponsored by: Apple, Inc.

  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/security/audit/audit_pipe.c
--- stable/7/sys/security/audit/audit_pipe.c	Wed Feb 25 11:37:19 2009	(r189030)
+++ stable/7/sys/security/audit/audit_pipe.c	Wed Feb 25 11:44:03 2009	(r189031)
@@ -407,6 +407,10 @@ audit_pipe_preselect(au_id_t auid, au_ev
 	struct audit_pipe *ap;
+	/* Lockless read to avoid acquiring the global lock if not needed. */
+	if (TAILQ_EMPTY(&audit_pipe_list))
+		return (0);
 	TAILQ_FOREACH(ap, &audit_pipe_list, ap_list) {

More information about the svn-src-stable-7 mailing list