Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
fa84cb93
Commit
fa84cb93
authored
Mar 29, 2006
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] move call of audit_free() into do_exit()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
d6fe3945
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
10 deletions
+4
-10
kernel/auditsc.c
kernel/auditsc.c
+1
-8
kernel/exit.c
kernel/exit.c
+3
-0
kernel/fork.c
kernel/fork.c
+0
-2
No files found.
kernel/auditsc.c
View file @
fa84cb93
...
@@ -698,19 +698,12 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
...
@@ -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
* audit_free - free a per-task audit context
* @tsk: task whose audit context block to free
* @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
)
void
audit_free
(
struct
task_struct
*
tsk
)
{
{
struct
audit_context
*
context
;
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
);
context
=
audit_get_context
(
tsk
,
0
,
0
);
if
(
likely
(
!
context
))
if
(
likely
(
!
context
))
return
;
return
;
...
...
kernel/exit.c
View file @
fa84cb93
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include <linux/futex.h>
#include <linux/futex.h>
#include <linux/compat.h>
#include <linux/compat.h>
#include <linux/pipe_fs_i.h>
#include <linux/pipe_fs_i.h>
#include <linux/audit.h>
/* for audit_free() */
#include <asm/uaccess.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include <asm/unistd.h>
...
@@ -910,6 +911,8 @@ fastcall NORET_TYPE void do_exit(long code)
...
@@ -910,6 +911,8 @@ fastcall NORET_TYPE void do_exit(long code)
if
(
unlikely
(
tsk
->
compat_robust_list
))
if
(
unlikely
(
tsk
->
compat_robust_list
))
compat_exit_robust_list
(
tsk
);
compat_exit_robust_list
(
tsk
);
#endif
#endif
if
(
unlikely
(
tsk
->
audit_context
))
audit_free
(
tsk
);
exit_mm
(
tsk
);
exit_mm
(
tsk
);
exit_sem
(
tsk
);
exit_sem
(
tsk
);
...
...
kernel/fork.c
View file @
fa84cb93
...
@@ -114,8 +114,6 @@ void __put_task_struct(struct task_struct *tsk)
...
@@ -114,8 +114,6 @@ void __put_task_struct(struct task_struct *tsk)
WARN_ON
(
atomic_read
(
&
tsk
->
usage
));
WARN_ON
(
atomic_read
(
&
tsk
->
usage
));
WARN_ON
(
tsk
==
current
);
WARN_ON
(
tsk
==
current
);
if
(
unlikely
(
tsk
->
audit_context
))
audit_free
(
tsk
);
security_task_free
(
tsk
);
security_task_free
(
tsk
);
free_uid
(
tsk
->
user
);
free_uid
(
tsk
->
user
);
put_group_info
(
tsk
->
group_info
);
put_group_info
(
tsk
->
group_info
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment