From 9f332c91ef20b2392e96c3aed469ba04aeb7b13f Mon Sep 17 00:00:00 2001 From: rwatson Date: Thu, 7 Jun 2007 22:27:15 +0000 Subject: Move per-process audit state from a pointer in the proc structure to embedded storage in struct ucred. This allows audit state to be cached with the thread, avoiding locking operations with each system call, and makes it available in asynchronous execution contexts, such as deep in the network stack or VFS. Reviewed by: csjp Approved by: re (kensmith) Obtained from: TrustedBSD Project --- sys/kern/kern_fork.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'sys/kern/kern_fork.c') diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index ae3531c..04b31d4 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -279,9 +279,6 @@ fork1(td, flags, pages, procp) #ifdef MAC mac_init_proc(newproc); #endif -#ifdef AUDIT - audit_proc_alloc(newproc); -#endif knlist_init(&newproc->p_klist, &newproc->p_mtx, NULL, NULL, NULL); STAILQ_INIT(&newproc->p_ktr); @@ -510,9 +507,6 @@ again: p2->p_sflag = PS_INMEM; PROC_SUNLOCK(p2); td2->td_ucred = crhold(p2->p_ucred); -#ifdef AUDIT - audit_proc_fork(p1, p2); -#endif pargs_hold(p2->p_args); if (flags & RFSIGSHARE) { @@ -753,9 +747,6 @@ fail: #ifdef MAC mac_destroy_proc(newproc); #endif -#ifdef AUDIT - audit_proc_free(newproc); -#endif uma_zfree(proc_zone, newproc); if (p1->p_flag & P_HADTHREADS) { PROC_LOCK(p1); -- cgit v1.1