Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286057
b: refs/heads/master
c: a4ff8db
h: refs/heads/master
i:
  286055: 2a9df6a
v: v3
  • Loading branch information
Eric Paris authored and Al Viro committed Jan 17, 2012
1 parent 2914dbb commit 769c94e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 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: 38cdce53daa0408a61fe6d86fe48f31515c9b840
refs/heads/master: a4ff8dba7d8ce5ceb43fb27df66292251cc73bdc
7 changes: 6 additions & 1 deletion trunk/include/linux/audit.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ extern int audit_classify_arch(int arch);
/* Public API */
extern void audit_finish_fork(struct task_struct *child);
extern int audit_alloc(struct task_struct *task);
extern void audit_free(struct task_struct *task);
extern void __audit_free(struct task_struct *task);
extern void __audit_syscall_entry(int arch,
int major, unsigned long a0, unsigned long a1,
unsigned long a2, unsigned long a3);
Expand All @@ -435,6 +435,11 @@ static inline int audit_dummy_context(void)
void *p = current->audit_context;
return !p || *(int *)p;
}
static inline void audit_free(struct task_struct *task)
{
if (unlikely(task->audit_context))
__audit_free(task);
}
static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
unsigned long a1, unsigned long a2,
unsigned long a3)
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
*
* Called from copy_process and do_exit
*/
void audit_free(struct task_struct *tsk)
void __audit_free(struct task_struct *tsk)
{
struct audit_context *context;

Expand Down
3 changes: 1 addition & 2 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,7 @@ NORET_TYPE void do_exit(long code)
acct_collect(code, group_dead);
if (group_dead)
tty_audit_exit();
if (unlikely(tsk->audit_context))
audit_free(tsk);
audit_free(tsk);

tsk->exit_code = code;
taskstats_exit(tsk, group_dead);
Expand Down

0 comments on commit 769c94e

Please sign in to comment.