linux/arch/m68k
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
..
amiga SPIN_LOCK_UNLOCKED cleanup in arch/m68k 2007-05-07 12:12:59 -07:00
apollo m68k: missing __init 2007-07-20 08:24:49 -07:00
atari Atari keyboard: incorporate additional review comments 2007-10-15 13:08:55 -07:00
bvme6000 m68k: missing __init 2007-07-20 08:24:49 -07:00
configs [PATCH] M68k: Mark Sun-3 NCR5380 SCSI broken 2005-06-12 20:43:22 -07:00
fpsp040 [PATCH] Add wording to m68k .S files to help clarify license info 2006-02-11 21:41:11 -08:00
hp300 IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
ifpsp060 [PATCH] m68k: convert thread flags to use bit fields 2005-11-13 18:14:14 -08:00
kernel remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
lib missing exports of csum_... 2007-07-17 11:01:07 -07:00
mac m68k: missing __init 2007-07-20 08:24:49 -07:00
math-emu Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mm pid namespaces: define is_global_init() and is_container_init() 2007-10-19 11:53:37 -07:00
mvme16x m68k: missing __init 2007-07-20 08:24:49 -07:00
mvme147 m68k: missing __init 2007-07-20 08:24:49 -07:00
q40 m68k: missing __init 2007-07-20 08:24:49 -07:00
sun3 m68k: missing __init 2007-07-20 08:24:49 -07:00
sun3x m68k: missing __init 2007-07-20 08:24:49 -07:00
tools/amiga Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
defconfig [PATCH] M68k: Update defconfigs 2005-06-12 20:43:21 -07:00
Kconfig m68k: exclude more unbuildable drivers 2007-07-20 08:24:49 -07:00
Kconfig.debug Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile kbuild: enable 'make CFLAGS=...' to add additional options to CC 2007-10-14 22:21:35 +02:00