linux/arch/ppc/kernel
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
..
asm-offsets.c rename thread_info to stack 2007-05-09 12:30:56 -07:00
cpu_setup_power4.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
entry.S [PPC] Fix COMMON symbol warnings 2007-05-23 00:17:44 -05:00
head_4xx.S Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
head_8xx.S [PPC] 8xx: Fix r3 trashing due to 8MB TLB page instantiation 2007-09-10 16:01:22 -05:00
head_44x.S [PPC] Use cpu setup routines from cpu_setup_44x.S for ARCH=ppc 2007-10-04 11:02:09 +10:00
head_booke.h [PATCH] ppc32: fix ppc44x fpu build 2005-11-10 11:24:06 +11:00
head_fsl_booke.S [POWERPC] 85xx: Drop use of SYNC macro in head_fsl_booke.S 2007-02-13 16:13:27 -06:00
head.S [POWERPC] Remove APUS support from arch/ppc 2007-09-17 15:15:04 +10:00
machine_kexec.c Storage class should be first 2006-06-26 18:57:34 +02:00
Makefile [POWERPC] 8xx: generic 8xx code arch/powerpc port 2007-02-07 14:01:02 +11:00
misc.S [POWERPC] Fix small race in 44x tlbie function 2007-08-15 15:12:50 +10:00
pci.c PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries() 2007-07-11 16:02:07 -07:00
ppc_htab.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
ppc_ksyms.c [POWERPC] Remove APUS support from arch/ppc 2007-09-17 15:15:04 +10:00
ppc-stub.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
relocate_kernel.S [PATCH] ppc32: use correct register names in arch/ppc/kernel/relocate_kernel.S 2005-06-30 08:45:09 -07:00
rio.c [PATCH] RapidIO support: ppc32 2005-11-07 07:53:47 -08:00
semaphore.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
setup.c [POWERPC] Remove APUS support from arch/ppc 2007-09-17 15:15:04 +10:00
smp-tbsync.c [POWERPC] Fix irq enable/disable in smp_generic_take_timebase 2006-08-30 16:10:47 +10:00
smp.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
softemu8xx.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
time.c [POWERPC] ppc: Add missing calls to set_irq_regs 2006-10-16 15:52:14 +10:00
traps.c pid namespaces: define is_global_init() and is_container_init() 2007-10-19 11:53:37 -07:00
vmlinux.lds.S [POWERPC] Fix ppc kernels after build-id addition 2007-09-22 14:49:21 +10:00