PERFORCE change 91049 for review

Robert Watson rwatson at FreeBSD.org
Sat Feb 4 12:53:40 GMT 2006


http://perforce.freebsd.org/chv.cgi?CH=91049

Change 91049 by rwatson at rwatson_peppercorn on 2006/02/04 12:53:12

	When GC'ing a thread, assert that it has no active audit record.
	This should not happen, but with this assert, brueffer and I would
	not have spent 45 minutes trying to figure out why he wasn't
	seeing audit records with the audit version in CVS.

Affected files ...

.. //depot/projects/trustedbsd/audit3/sys/kern/kern_thread.c#6 edit
.. //depot/projects/trustedbsd/audit3/sys/security/audit/audit.c#5 edit
.. //depot/projects/trustedbsd/audit3/sys/security/audit/audit.h#10 edit

Differences ...

==== //depot/projects/trustedbsd/audit3/sys/kern/kern_thread.c#6 (text+ko) ====

@@ -172,7 +172,9 @@
 		/* NOTREACHED */
 	}
 #endif
-
+#ifdef AUDIT
+	audit_thread_free(td);
+#endif
 	free_unr(tid_unrhdr, td->td_tid);
 	sched_newthread(td);
 }

==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit.c#5 (text+ko) ====

@@ -1026,6 +1026,16 @@
 	td->td_ar = NULL;
 }
 
+/*
+ * Thread destruction.
+ */
+void
+audit_thread_free(struct thread *td)
+{
+
+	KASSERT(td->td_ar == NULL, ("audit_thread_free: td_ar != NULL"));
+}
+
 /* 
  * Initialize the audit information for the a process, presumably the first 
  * process in the system.

==== //depot/projects/trustedbsd/audit3/sys/security/audit/audit.h#10 (text+ko) ====

@@ -182,6 +182,7 @@
 					 struct proc *child);
 void			 audit_proc_free(struct proc *p);
 void			 audit_thread_alloc(struct thread *td);
+void			 audit_thread_free(struct thread *td);
 
 /*
  * Define a macro to wrap the audit_arg_* calls by checking the global
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