Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26445
b: refs/heads/master
c: fa84cb9
h: refs/heads/master
i:
  26443: 9019d8f
v: v3
  • Loading branch information
Al Viro committed May 1, 2006
1 parent 59a112e commit d85b3c8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6fe3945b42d09a1eca7ad180a1646e585b8594f
refs/heads/master: fa84cb935d4ec601528f5e2f0d5d31e7876a5044
9 changes: 1 addition & 8 deletions trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,19 +698,12 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
* audit_free - free a per-task audit context
* @tsk: task whose audit context block to free
*
* Called from copy_process and __put_task_struct.
* Called from copy_process and do_exit
*/
void audit_free(struct task_struct *tsk)
{
struct audit_context *context;

/*
* 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);
if (likely(!context))
return;
Expand Down
3 changes: 3 additions & 0 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <linux/futex.h>
#include <linux/compat.h>
#include <linux/pipe_fs_i.h>
#include <linux/audit.h> /* for audit_free() */

#include <asm/uaccess.h>
#include <asm/unistd.h>
Expand Down Expand Up @@ -910,6 +911,8 @@ fastcall NORET_TYPE void do_exit(long code)
if (unlikely(tsk->compat_robust_list))
compat_exit_robust_list(tsk);
#endif
if (unlikely(tsk->audit_context))
audit_free(tsk);
exit_mm(tsk);

exit_sem(tsk);
Expand Down
2 changes: 0 additions & 2 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ void __put_task_struct(struct task_struct *tsk)
WARN_ON(atomic_read(&tsk->usage));
WARN_ON(tsk == current);

if (unlikely(tsk->audit_context))
audit_free(tsk);
security_task_free(tsk);
free_uid(tsk->user);
put_group_info(tsk->group_info);
Expand Down

0 comments on commit d85b3c8

Please sign in to comment.