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>
This commit is contained in:
committed by
Linus Torvalds
parent
355e0c48b7
commit
b4f48b6363
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user