WSL2-Linux-Kernel/arch/arm
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
..
boot Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2007-10-16 11:23:06 -07:00
common PM: Rename struct pm_ops and related things 2007-10-18 14:37:18 -07:00
configs Merge branch 'pxa' into devel 2007-10-15 18:56:02 +01:00
kernel remove include/asm-*/ipc.h 2007-10-17 08:42:55 -07:00
lib [ARM] spelling fixes 2007-05-20 20:10:32 +01:00
mach-aaec2000 Add IRQF_IRQPOLL flag on arm 2007-05-08 11:15:22 -07:00
mach-at91 PM: Rename struct pm_ops and related things 2007-10-18 14:37:18 -07:00
mach-clps711x Add IRQF_IRQPOLL flag on arm 2007-05-08 11:15:22 -07:00
mach-clps7500 [ARM] cleanup struct irqaction initializers 2007-10-12 23:43:20 +01:00
mach-davinci clockevents: fix resume logic 2007-07-21 17:49:15 -07:00
mach-ebsa110 [ARM] EBSA110: fix build errors caused by missing "const" 2007-05-11 17:20:02 +01:00
mach-ep93xx [ARM] 4572/1: ep93xx: add cirrus logic edb9307 support 2007-10-12 23:43:44 +01:00
mach-footbridge Remove magic macros for screen_info structure members 2007-10-16 22:57:17 -07:00
mach-h720x [ARM] spelling fixes 2007-05-20 20:10:32 +01:00
mach-imx Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq 2007-10-12 15:42:01 -07:00
mach-integrator [ARM] integrator: fix pci_v3 compile error with DEBUG_LL 2007-05-17 10:16:55 +01:00
mach-iop13xx some kmalloc/memset ->kzalloc (tree wide) 2007-07-19 10:04:50 -07:00
mach-iop32x [ARM] 4491/1: em7210 rtc clock 2007-07-20 17:29:35 +01:00
mach-iop33x iop3xx: surface the iop3xx DMA and AAU units to the iop-adma driver 2007-07-13 08:06:19 -07:00
mach-ixp4xx Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-07-22 11:22:59 -07:00
mach-ixp23xx [ARM] Fix some section mismatch warnings 2007-05-30 17:48:45 +01:00
mach-ixp2000 [ARM] Fix some section mismatch warnings 2007-05-30 17:48:45 +01:00
mach-ks8695 [ARM] 4549/1: KS8695: Fix build errors 2007-08-14 17:23:55 +01:00
mach-l7200 [ARM] Remove compatibility layer for ARM irqs 2006-11-30 12:24:47 +00:00
mach-lh7a40x [ARM] spelling fixes 2007-05-20 20:10:32 +01:00
mach-mx3 [ARM] 4461/1: MXC platform and i.MX31ADS core support 2007-07-22 15:44:46 +01:00
mach-netx Add IRQF_IRQPOLL flag on arm 2007-05-08 11:15:22 -07:00
mach-ns9xxx [ARM] 4595/1: ns9xxx: define registers as void __iomem * instead of volatile u32 2007-10-12 23:43:41 +01:00
mach-omap1 PM: Rework struct platform_suspend_ops 2007-10-18 14:37:18 -07:00
mach-omap2 PM: Rework struct platform_suspend_ops 2007-10-18 14:37:18 -07:00
mach-pnx4008 PM: Rename struct pm_ops and related things 2007-10-18 14:37:18 -07:00
mach-pxa PM: Rename struct pm_ops and related things 2007-10-18 14:37:18 -07:00
mach-realview [ARM] realview: disable second GIC on RevB MPCore platforms 2007-09-13 15:10:25 +01:00
mach-rpc [ARM] rpc: convert an outb() to writeb() 2007-07-20 21:29:39 +01:00
mach-s3c2400 [ARM] 4157/2: S3C24XX: move arch/arch/mach-s3c2410 into cpu components 2007-02-11 17:36:09 +00:00
mach-s3c2410 s3c2410fb: removes lcdcon1 register value from s3c2410fb_display 2007-10-16 09:43:18 -07:00
mach-s3c2412 [ARM] 4596/1: S3C2412: Correct IRQs for SDI+CF and add decoding support 2007-10-12 23:43:42 +01:00
mach-s3c2440 s3c2410fb: removes lcdcon1 register value from s3c2410fb_display 2007-10-16 09:43:18 -07:00
mach-s3c2442 [ARM] 4546/1: s3c2410: fix architecture typo for s3c2442 2007-08-14 17:23:49 +01:00
mach-s3c2443 [ARM] 4566/1: s3c24xx: fix dma functions section mismatch 2007-10-12 23:43:15 +01:00
mach-sa1100 PM: Rename struct pm_ops and related things 2007-10-18 14:37:18 -07:00
mach-shark Add IRQF_IRQPOLL flag on arm 2007-05-08 11:15:22 -07:00
mach-versatile [ARM] 4454/1: Use word accesses in Versatile PCI config reads 2007-07-02 13:39:35 +01:00
mm pid namespaces: define is_global_init() and is_container_init() 2007-10-19 11:53:37 -07:00
nwfpe Replace __attribute_pure__ with __pure 2007-10-18 14:37:32 -07:00
oprofile [ARM] Solve buggy smp_processor_id() usage 2007-06-02 21:31:49 +01:00
plat-iop [ARM] 4495/1: iop: combined watchdog timer driver for iop3xx and iop13xx 2007-07-20 09:35:42 +01:00
plat-mxc [ARM] 4461/1: MXC platform and i.MX31ADS core support 2007-07-22 15:44:46 +01:00
plat-omap Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-10-15 16:08:50 -07:00
plat-s3c [ARM] 4518/1: S3C: Rename watchdog configuration options 2007-07-22 16:44:38 +01:00
plat-s3c24xx PM: Rename struct pm_ops and related things 2007-10-18 14:37:18 -07:00
tools [ARM] Update mach-types 2007-05-11 19:54:39 +01:00
vfp kbuild: enable 'make AFLAGS=...' to add additional options to AS 2007-10-15 21:59:31 +02:00
Kconfig Merge branch 'pxa' into devel 2007-10-15 18:56:02 +01:00
Kconfig-nommu [ARM] 4532/1: allow configuration of processor ID 2007-10-12 23:43:02 +01:00
Kconfig.debug [ARM] 4514/1: S3C: Rename DEBUG_S3C2410_PORT and DEBUG_S3C_UART 2007-07-22 16:44:33 +01:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2007-10-16 11:23:06 -07:00