android_kernel_xiaomi_sm8350/init
Oleg Nesterov fae5fa44f1 signals: fix /sbin/init protection from unwanted signals
The global init has a lot of long standing problems with the unhandled fatal
signals.

	- The "is_global_init(current)" check in get_signal_to_deliver()
	  protects only the main thread. Sub-thread can dequee the fatal
	  signal and shutdown the whole thread group except the main thread.
	  If it dequeues SIGSTOP /sbin/init will be stopped, this is not
	  right too. Note that we can't use is_global_init(->group_leader),
	  this breaks exec and this can't solve other problems we have.

	- Even if afterwards ignored, the fatal signals sets SIGNAL_GROUP_EXIT
	  on delivery. This breaks exec, has other bad implications, and this
	  is just wrong.

Introduce the new SIGNAL_UNKILLABLE flag to fix these problems.  It also helps
to solve some other problems addressed by the subsequent patches.

Currently we use this flag for the global init only, but it could also be used
by kthreads and (perhaps) by the sub-namespace inits.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30 08:29:37 -07:00
..
calibrate.c calibrate_delay() must be __cpuinit 2008-02-06 10:41:08 -08:00
do_mounts_initrd.c Freezer: Fix s2disk resume from initrd 2007-11-20 22:22:42 -05:00
do_mounts_md.c init: fix integer as NULL pointer warnings 2008-04-28 17:29:18 -07:00
do_mounts_rd.c init: fix integer as NULL pointer warnings 2008-04-28 17:29:18 -07:00
do_mounts.c Use struct path in fs_struct 2008-02-14 21:13:33 -08:00
do_mounts.h
initramfs.c directly use kmalloc() and kfree() in init/initramfs.c 2008-04-29 08:06:06 -07:00
Kconfig sysctl: allow embedded targets to disable sysctl_check.c 2008-04-29 08:06:22 -07:00
main.c signals: fix /sbin/init protection from unwanted signals 2008-04-30 08:29:37 -07:00
Makefile kbuild: fix make V=1 2008-02-11 17:43:54 +01:00
noinitramfs.c
version.c