android_kernel_xiaomi_sm8350/init
Serge E. Hallyn 858d72ead4 cgroups: implement namespace tracking subsystem
When a task enters a new namespace via a clone() or unshare(), a new cgroup
is created and the task moves into it.

This version names cgroups which are automatically created using
cgroup_clone() as "node_<pid>" where pid is the pid of the unsharing or
cloned process.  (Thanks Pavel for the idea) This is safe because if the
process unshares again, it will create

	/cgroups/(...)/node_<pid>/node_<pid>

The only possibilities (AFAICT) for a -EEXIST on unshare are

	1. pid wraparound
	2. a process fails an unshare, then tries again.

Case 1 is unlikely enough that I ignore it (at least for now).  In case 2, the
node_<pid> will be empty and can be rmdir'ed to make the subsequent unshare()
succeed.

Changelog:
	Name cloned cgroups as "node_<pid>".

[clg@fr.ibm.com: fix order of cgroup subsystems in init/Kconfig]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: 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>
2007-10-19 11:53:37 -07:00
..
calibrate.c slow down printk during boot 2007-10-16 09:42:49 -07:00
do_mounts_initrd.c Fix failure to resume from initrds 2007-09-19 11:24:17 -07:00
do_mounts_md.c [PATCH] md: remove MAX_MD_DEVS which is an arbitrary limit 2006-10-03 08:04:18 -07:00
do_mounts_rd.c sparse pointer use of zero as null 2007-10-18 14:37:31 -07:00
do_mounts.c init: wait for asynchronously scanned block devices 2007-07-16 09:05:45 -07:00
do_mounts.h Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
initramfs.c initramfs: missing __init 2007-07-26 11:11:56 -07:00
Kconfig cgroups: implement namespace tracking subsystem 2007-10-19 11:53:37 -07:00
main.c Task Control Groups: basic task cgroup framework 2007-10-19 11:53:36 -07:00
Makefile kbuild: enable 'make CFLAGS=...' to add additional options to CC 2007-10-14 22:21:35 +02:00
noinitramfs.c [PATCH] disable init/initramfs.c 2007-02-11 10:51:25 -08:00
version.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00