summaryrefslogtreecommitdiffstats
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-17 15:45:55 +0200
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-08-17 15:45:55 +0200
commit413a1c7520ad6207c9122a749983c500f29e3e32 (patch)
tree81155d0224d35cace00c1fe50a146e30a58e68d4 /kernel/auditsc.c
parentMerge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git (diff)
downloadlinux-413a1c7520ad6207c9122a749983c500f29e3e32.tar.xz
linux-413a1c7520ad6207c9122a749983c500f29e3e32.zip
AUDIT: Fix task refcount leak in audit_filter_syscall()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to '')
-rw-r--r--kernel/auditsc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 46b45abceb9a..a73176eaa57d 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1007,7 +1007,7 @@ void audit_syscall_exit(struct task_struct *tsk, int valid, long return_code)
/* Not having a context here is ok, since the parent may have
* called __put_task_struct. */
if (likely(!context))
- return;
+ goto out;
if (context->in_syscall && context->auditable)
audit_log_exit(context, GFP_KERNEL);
@@ -1026,6 +1026,7 @@ void audit_syscall_exit(struct task_struct *tsk, int valid, long return_code)
audit_zero_context(context, context->state);
tsk->audit_context = context;
}
+ out:
put_task_struct(tsk);
}