From 5772ff4a6af1e0b0c1d3e8152c1ca1c33adb8a27 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 7 Mar 2006 23:51:39 -0800 Subject: [PATCH] --- yaml --- r: 23992 b: refs/heads/master c: 4023e020807ea249ae83f0d1d851b4c7cf0afd8a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/auditsc.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index d2ba92755322..621df577ed32 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d9d9ec6e2c45b22282cd36cf92fcb23d504350a8 +refs/heads/master: 4023e020807ea249ae83f0d1d851b4c7cf0afd8a diff --git a/trunk/kernel/auditsc.c b/trunk/kernel/auditsc.c index d3d499272d13..b613ec89e99c 100644 --- a/trunk/kernel/auditsc.c +++ b/trunk/kernel/auditsc.c @@ -704,10 +704,14 @@ void audit_free(struct task_struct *tsk) { struct audit_context *context; - task_lock(tsk); + /* + * No need to lock the task - when we execute audit_free() + * then the task has no external references anymore, and + * we are tearing it down. (The locking also confuses + * DEBUG_LOCKDEP - this freeing may occur in softirq + * contexts as well, via RCU.) + */ context = audit_get_context(tsk, 0, 0); - task_unlock(tsk); - if (likely(!context)) return;