diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-29 20:26:24 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-05-01 06:06:21 -0400 |
commit | 97e94c453073a2aba4bb5e0825ddc5e923debf11 (patch) | |
tree | 9ed466c5252608302389f59d00c1e9e3eecd7303 /kernel/auditsc.c | |
parent | 5411be59db80333039386f3b1ccfe5eb9023a916 (diff) | |
download | lwn-97e94c453073a2aba4bb5e0825ddc5e923debf11.tar.gz lwn-97e94c453073a2aba4bb5e0825ddc5e923debf11.zip |
[PATCH] no need to wank with task_lock() and pinning task down in audit_syscall_exit()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 7ed82b088e4b..8aca4ab4aa27 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -329,7 +329,6 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk, return AUDIT_BUILD_CONTEXT; } -/* This should be called with task_lock() held. */ static inline struct audit_context *audit_get_context(struct task_struct *tsk, int return_valid, int return_code) @@ -823,15 +822,10 @@ void audit_syscall_exit(int valid, long return_code) struct task_struct *tsk = current; struct audit_context *context; - get_task_struct(tsk); - task_lock(tsk); context = audit_get_context(tsk, valid, return_code); - task_unlock(tsk); - /* Not having a context here is ok, since the parent may have - * called __put_task_struct. */ if (likely(!context)) - goto out; + return; if (context->in_syscall && context->auditable) audit_log_exit(context, tsk); @@ -849,8 +843,6 @@ void audit_syscall_exit(int valid, long return_code) audit_free_aux(context); tsk->audit_context = context; } - out: - put_task_struct(tsk); } /** |