diff options
author | Paul Menage <menage@google.com> | 2007-10-19 08:39:33 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 20:53:36 +0200 |
commit | b4f48b6363c81ca743ef46943ef23fd72e60f679 (patch) | |
tree | 40437b78e2d7a7d9d71e7bd63bc96e1ad02daa94 /kernel/exit.c | |
parent | Add cgroup write_uint() helper method (diff) | |
download | linux-b4f48b6363c81ca743ef46943ef23fd72e60f679.tar.xz linux-b4f48b6363c81ca743ef46943ef23fd72e60f679.zip |
Task Control Groups: add fork()/exit() hooks
This adds the necessary hooks to the fork() and exit() paths to ensure
that new children inherit their parent's cgroup assignments, and that
exiting processes release reference counts on their cgroups.
Signed-off-by: Paul Menage <menage@google.com>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 2c704c86edb3..44ff6147556a 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -32,6 +32,7 @@ #include <linux/delayacct.h> #include <linux/freezer.h> #include <linux/cpuset.h> +#include <linux/cgroup.h> #include <linux/syscalls.h> #include <linux/signal.h> #include <linux/posix-timers.h> @@ -973,6 +974,7 @@ fastcall NORET_TYPE void do_exit(long code) check_stack_usage(); exit_thread(); cpuset_exit(tsk); + cgroup_exit(tsk, 1); exit_keys(tsk); if (group_dead && tsk->signal->leader) |