aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2011-12-21 15:17:03 -0500
committerJames Morris <jmorris@namei.org>2012-02-09 17:14:51 -0500
commit1a2a4d06e1e95260c470ebe3a945f61bbe8c1fd8 (patch)
tree7167d158749a7acf2ce8bbe1ecd25234b654e813 /kernel/fork.c
parent9e3ff38647a316e4f92d59b14c8f0eb13b33bb2c (diff)
security: create task_free security callback
The current LSM interface to cred_free is not sufficient for allowing an LSM to track the life and death of a task. This patch adds the task_free hook so that an LSM can clean up resources on task death. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 1b2ef3c23ae4..f0e7781ba9b4 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -192,6 +192,7 @@ void __put_task_struct(struct task_struct *tsk)
192 WARN_ON(atomic_read(&tsk->usage)); 192 WARN_ON(atomic_read(&tsk->usage));
193 WARN_ON(tsk == current); 193 WARN_ON(tsk == current);
194 194
195 security_task_free(tsk);
195 exit_creds(tsk); 196 exit_creds(tsk);
196 delayacct_tsk_free(tsk); 197 delayacct_tsk_free(tsk);
197 put_signal_struct(tsk->signal); 198 put_signal_struct(tsk->signal);