Date: Sat, 4 Feb 2006 12:53:40 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 91049 for review Message-ID: <200602041253.k14Crecf011086@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=91049 Change 91049 by rwatson@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602041253.k14Crecf011086>