linux_dsm_epyc7002/arch/s390
Serge E. Hallyn b460cbc581 pid namespaces: define is_global_init() and is_container_init()
is_init() is an ambiguous name for the pid==1 check.  Split it into
is_global_init() and is_container_init().

A cgroup init has it's tsk->pid == 1.

A global init also has it's tsk->pid == 1 and it's active pid namespace
is the init_pid_ns.  But rather than check the active pid namespace,
compare the task structure with 'init_pid_ns.child_reaper', which is
initialized during boot to the /sbin/init process and never changes.

Changelog:

	2.6.22-rc4-mm2-pidns1:
	- Use 'init_pid_ns.child_reaper' to determine if a given task is the
	  global init (/sbin/init) process. This would improve performance
	  and remove dependence on the task_pid().

	2.6.21-mm2-pidns2:

	- [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
	  ppc,avr32}/traps.c for the _exception() call to is_global_init().
	  This way, we kill only the cgroup if the cgroup's init has a
	  bug rather than force a kernel panic.

[akpm@linux-foundation.org: fix comment]
[sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
[bunk@stusta.de: kernel/pid.c: remove unused exports]
[sukadev@us.ibm.com: Fix capability.c to work with threaded init]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Acked-by: Pavel Emelianov <xemul@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Herbert Poetzel <herbert@13thfloor.at>
Cc: Kirill Korotaev <dev@sw.ru>
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
..
appldata [S390] appldata_base: Remove module_exit function and modular stuff 2007-10-12 16:13:05 +02:00
boot [PATCH] use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh 2005-06-23 09:45:07 -07:00
crypto [CRYPTO] sha: Add header file for SHA definitions 2007-10-10 16:55:50 -07:00
hypfs [S390] hypfs: inode corruption due to missing locking 2007-08-22 13:51:49 +02:00
kernel remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
lib pid namespaces: define is_global_init() and is_container_init() 2007-10-19 11:53:37 -07:00
math-emu [S390] Calibrate delay and bogomips. 2007-02-05 21:18:31 +01:00
mm pid namespaces: define is_global_init() and is_container_init() 2007-10-19 11:53:37 -07:00
oprofile [PATCH] s390: add oprofile callgraph support 2006-01-06 08:33:50 -08:00
defconfig [S390] z/VM unit record device driver 2007-07-17 13:36:19 +02:00
Kconfig [S390] remove DEFAULT_MIGRATION_COST 2007-08-10 14:32:37 +02:00
Kconfig.debug [PATCH] lockdep: irqtrace subsystem, s390 support 2006-07-03 15:27:03 -07:00
Makefile kbuild: enable 'make AFLAGS=...' to add additional options to AS 2007-10-15 21:59:31 +02:00