kernel-ark/arch/mips
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
..
au1000 [MIPS] time: Move R4000 clockevent device code to separate configurable file 2007-10-18 18:11:47 +01:00
basler/excite [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
bcm47xx [MIPS] Deforest the function pointer jungle in the time code. 2007-10-11 23:46:08 +01:00
boot [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
cobalt [MIPS] Cobalt: Remove cobalt_machine_power_off() 2007-10-11 23:46:14 +01:00
configs task cgroups: enable cgroups by default in some configs 2007-10-19 11:53:36 -07:00
dec [MIPS] Allow hardwiring of the CPU type to a single type for optimization. 2007-10-11 23:46:15 +01:00
emma2rh [MIPS] Deforest the function pointer jungle in the time code. 2007-10-11 23:46:08 +01:00
fw [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
gt64120/wrppmc [MIPS] WRPPMC serial support move to platform device 2007-10-11 23:46:19 +01:00
jazz [MIPS] Jazz: Retire use of plat_timer_setup. 2007-10-18 18:11:47 +01:00
jmr3927 [MIPS] JMR3927: Convert to clock_event_device. 2007-10-18 18:11:46 +01:00
kernel pid namespaces: round up the API 2007-10-19 11:53:37 -07:00
lasat [MIPS] Lasat: Fix build by conversion to irq_cpu.c. 2007-10-16 18:23:47 +01:00
lemote/lm2e [MIPS] Deforest the function pointer jungle in the time code. 2007-10-11 23:46:08 +01:00
lib [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
math-emu [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
mips-boards [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
mipssim [MIPS] MIPSsim: Fix booting from NFS root 2007-10-16 18:23:49 +01:00
mm pid namespaces: define is_global_init() and is_container_init() 2007-10-19 11:53:37 -07:00
oprofile [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
pci spin_lock_unlocked cleanups 2007-10-17 08:43:01 -07:00
philips/pnx8550 [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
pmc-sierra [MIPS] time: Move R4000 clockevent device code to separate configurable file 2007-10-18 18:11:47 +01:00
qemu [MIPS] Fix "no space between function name and open parenthesis" warnings. 2007-10-11 23:46:15 +01:00
sgi-ip22 [MIPS] IP22: Fix hang due to messing with timer interrupt handler 2007-10-17 18:28:49 +01:00
sgi-ip27 [MIPS] IP27: Convert to clock_event_device. 2007-10-18 18:11:47 +01:00
sgi-ip32 [MIPS] IP32: Retire use of plat_timer_setup. 2007-10-18 18:11:47 +01:00
sibyte [MIPS] Sibyte: Fix typos in sibyte clockevent drivers 2007-10-17 18:28:49 +01:00
sni [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
tx4927 rtc: make rtc-ds1742 driver hotplug-aware 2007-10-16 09:43:13 -07:00
tx4938 [MIPS] checkfiles: Fix "need space after that ','" errors. 2007-10-11 23:46:15 +01:00
vr41xx [MIPS] time: Move R4000 clockevent device code to separate configurable file 2007-10-18 18:11:47 +01:00
defconfig [MIPS] Update a few defconfigs. 2007-08-27 02:16:55 +01:00
Kconfig [MIPS] time: Move R4000 clockevent device code to separate configurable file 2007-10-18 18:11:47 +01:00
Kconfig.debug [MIPS] SMTC: Fix cut'n'paste bug in Kconfig.debug 2007-07-06 16:17:11 +01:00
Makefile lk201: remove obsolete driver 2007-10-17 08:42:57 -07:00