[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080316155453.GA20845@tv-sign.ru>
Date: Sun, 16 Mar 2008 18:54:53 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Davide Libenzi <davidel@...ilserver.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Ingo Molnar <mingo@...e.hu>,
Laurent Riffard <laurent.riffard@...e.fr>,
Pavel Emelyanov <xemul@...nvz.org>,
Roland McGrath <roland@...hat.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 4/5] don't panic if /sbin/init exits or killed
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@...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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists