The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 4/5] don't panic if /sbin/init exits or killed
@ 2008-03-16 15:54 Oleg Nesterov
  2008-03-16 22:19 ` Roland McGrath
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Oleg Nesterov @ 2008-03-16 15:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Davide Libenzi, Eric W. Biederman, Ingo Molnar, Laurent Riffard,
	Pavel Emelyanov, Roland McGrath, linux-kernel

If the buggy init exits, the kernel panics. I see no point for this. It is very
possible that the system is still usable enough, at least to read the logs and
prepare the bug report.

Change exit_child_reaper() to do BUG() instead of panic().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 25/kernel/exit.c~4_EXIT_DONT_PANIC	2008-03-16 16:49:30.000000000 +0300
+++ 25/kernel/exit.c	2008-03-16 16:49:35.000000000 +0300
@@ -861,8 +861,10 @@ static inline void exit_child_reaper(str
 	if (likely(tsk->group_leader != task_child_reaper(tsk)))
 		return;
 
-	if (tsk->nsproxy->pid_ns == &init_pid_ns)
-		panic("Attempted to kill init!");
+	if (unlikely(tsk->nsproxy->pid_ns == &init_pid_ns)) {
+		printk(KERN_EMERG "Kernel panic - init is killed!\n");
+		BUG();
+	}
 
 	/*
 	 * @tsk is the last thread in the 'cgroup-init' and is exiting.


^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <a83rs-N7-9@gated-at.bofh.it>]

end of thread, other threads:[~2008-03-29 10:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-16 15:54 [PATCH 4/5] don't panic if /sbin/init exits or killed Oleg Nesterov
2008-03-16 22:19 ` Roland McGrath
2008-03-16 22:54   ` Krzysztof Halasa
2008-03-16 23:03   ` Oleg Nesterov
2008-03-16 22:55     ` Alan Cox
2008-03-16 23:32     ` Roland McGrath
2008-03-16 23:49       ` Oleg Nesterov
2008-03-16 23:59         ` Roland McGrath
2008-03-17  0:05           ` Oleg Nesterov
     [not found] ` <1205850955.6466.61.camel@moss-spartans.epoch.ncsc.mil>
2008-03-18 15:41   ` Oleg Nesterov
2008-03-29  5:47 ` H. Peter Anvin
2008-03-29 10:51   ` Oleg Nesterov
     [not found] <a83rs-N7-9@gated-at.bofh.it>
     [not found] ` <a89wR-8k4-3@gated-at.bofh.it>
     [not found]   ` <a8a9t-1pV-21@gated-at.bofh.it>
     [not found]     ` <a8aCw-2hv-31@gated-at.bofh.it>
2008-03-18 17:41       ` Bodo Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox