Skip to content

Commit

Permalink
AUDIT: Fix task refcount leak in audit_filter_syscall()
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
David Woodhouse committed Aug 17, 2005
1 parent 327b6b0 commit 413a1c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}

Expand Down

0 comments on commit 413a1c7

Please sign in to comment.