aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index d3d499272d13..b613ec89e99c 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -704,10 +704,14 @@ void audit_free(struct task_struct *tsk)
704{ 704{
705 struct audit_context *context; 705 struct audit_context *context;
706 706
707 task_lock(tsk); 707 /*
708 * No need to lock the task - when we execute audit_free()
709 * then the task has no external references anymore, and
710 * we are tearing it down. (The locking also confuses
711 * DEBUG_LOCKDEP - this freeing may occur in softirq
712 * contexts as well, via RCU.)
713 */
708 context = audit_get_context(tsk, 0, 0); 714 context = audit_get_context(tsk, 0, 0);
709 task_unlock(tsk);
710
711 if (likely(!context)) 715 if (likely(!context))
712 return; 716 return;
713 717