aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c10
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,
329 return AUDIT_BUILD_CONTEXT; 329 return AUDIT_BUILD_CONTEXT;
330} 330}
331 331
332/* This should be called with task_lock() held. */
333static inline struct audit_context *audit_get_context(struct task_struct *tsk, 332static inline struct audit_context *audit_get_context(struct task_struct *tsk,
334 int return_valid, 333 int return_valid,
335 int return_code) 334 int return_code)
@@ -823,15 +822,10 @@ void audit_syscall_exit(int valid, long return_code)
823 struct task_struct *tsk = current; 822 struct task_struct *tsk = current;
824 struct audit_context *context; 823 struct audit_context *context;
825 824
826 get_task_struct(tsk);
827 task_lock(tsk);
828 context = audit_get_context(tsk, valid, return_code); 825 context = audit_get_context(tsk, valid, return_code);
829 task_unlock(tsk);
830 826
831 /* Not having a context here is ok, since the parent may have
832 * called __put_task_struct. */
833 if (likely(!context)) 827 if (likely(!context))
834 goto out; 828 return;
835 829
836 if (context->in_syscall && context->auditable) 830 if (context->in_syscall && context->auditable)
837 audit_log_exit(context, tsk); 831 audit_log_exit(context, tsk);
@@ -849,8 +843,6 @@ void audit_syscall_exit(int valid, long return_code)
849 audit_free_aux(context); 843 audit_free_aux(context);
850 tsk->audit_context = context; 844 tsk->audit_context = context;
851 } 845 }
852 out:
853 put_task_struct(tsk);
854} 846}
855 847
856/** 848/**