Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754694AbbGJLkd (ORCPT ); Fri, 10 Jul 2015 07:40:33 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:52994 "EHLO mail7.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753712AbbGJLj4 (ORCPT ); Fri, 10 Jul 2015 07:39:56 -0400 X-AuditID: 85900ec0-9f5ccb9000001a57-6b-559faef188b9 X-Mailbox-Line: From nobody Fri Jul 10 20:33:31 2015 Subject: [PATCH 1/3] panic: Disable crash_kexec_post_notifiers if kdump is not available To: Andrew Morton , "Eric W. Biederman" , Vivek Goyal From: Hidehiro Kawai Cc: linux-mips@linux-mips.org, Baoquan He , linux-sh@vger.kernel.org, linux-s390@vger.kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Ingo Molnar , HATAYAMA Daisuke , Masami Hiramatsu , Daniel Walker , linuxppc-dev@lists.ozlabs.org, linux-metag@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Fri, 10 Jul 2015 20:33:31 +0900 Message-ID: <20150710113331.4368.63745.stgit@softrs> In-Reply-To: <20150710113331.4368.10495.stgit@softrs> References: <20150710113331.4368.10495.stgit@softrs> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 40 You can call panic notifiers and kmsg dumpers before kdump by specifying "crash_kexec_post_notifiers" as a boot parameter. However, it doesn't make sense if kdump is not available. In that case, disable "crash_kexec_post_notifiers" boot parameter so that you can't change the value of the parameter. Signed-off-by: Hidehiro Kawai Cc: Andrew Morton Cc: Eric Biederman Cc: Vivek Goyal --- kernel/panic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/panic.c b/kernel/panic.c index 04e91ff..5252331 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -502,12 +502,14 @@ __visible void __stack_chk_fail(void) core_param(pause_on_oops, pause_on_oops, int, 0644); core_param(panic_on_warn, panic_on_warn, int, 0644); +#ifdef CONFIG_CRASH_DUMP static int __init setup_crash_kexec_post_notifiers(char *s) { crash_kexec_post_notifiers = true; return 0; } early_param("crash_kexec_post_notifiers", setup_crash_kexec_post_notifiers); +#endif static int __init oops_setup(char *s) { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/