From patchwork Fri Jul 10 11:33:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hidehiro Kawai X-Patchwork-Id: 6765481 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DEFE49F380 for ; Fri, 10 Jul 2015 12:18:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F7892069A for ; Fri, 10 Jul 2015 12:18:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 299FD205FC for ; Fri, 10 Jul 2015 12:18:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754195AbbGJMSt (ORCPT ); Fri, 10 Jul 2015 08:18:49 -0400 Received: from fallback.hitachi.co.jp ([133.145.228.50]:51284 "EHLO mailxx.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753080AbbGJMSs (ORCPT ); Fri, 10 Jul 2015 08:18:48 -0400 X-Greylist: delayed 2334 seconds by postgrey-1.27 at vger.kernel.org; Fri, 10 Jul 2015 08:18:48 EDT Received: from mail7.hitachi.co.jp (mail7.hitachi.co.jp [133.145.228.42]) by mailxx.hitachi.co.jp (Postfix) with ESMTP id 7AA4D177045C; Fri, 10 Jul 2015 20:39:58 +0900 (JST) Received: from mlsv5.hitachi.co.jp (unknown [133.144.234.166]) by mail7.hitachi.co.jp (Postfix) with ESMTP id 888D1B1D385; Fri, 10 Jul 2015 20:39:54 +0900 (JST) Received: from mfilter05.hitachi.co.jp by mlsv5.hitachi.co.jp (8.13.1/8.13.1) id t6ABdscK001978; Fri, 10 Jul 2015 20:39:54 +0900 Received: from vshuts02.hitachi.co.jp (vshuts02.hitachi.co.jp [10.201.6.84]) by mfilter05.hitachi.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id t6ABdq2h019859; Fri, 10 Jul 2015 20:39:53 +0900 Received: from hsdlmain.sdl.hitachi.co.jp (unknown [133.144.14.194]) by vshuts02.hitachi.co.jp (Postfix) with ESMTP id 9E5D0490041; Fri, 10 Jul 2015 20:39:52 +0900 (JST) Received: from hsdlvgate2.sdl.hitachi.co.jp by hsdlmain.sdl.hitachi.co.jp (8.13.8/3.7W11021512) id t6ABdq03008822; Fri, 10 Jul 2015 20:39:52 +0900 X-AuditID: 85900ec0-9f5ccb9000001a57-6b-559faef188b9 Received: from sdl99w.sdl.hitachi.co.jp (sdl99w.yrl.intra.hitachi.co.jp [133.144.14.250]) by hsdlvgate2.sdl.hitachi.co.jp (Symantec Mail Security) with ESMTP id 8E318236561; Fri, 10 Jul 2015 20:39:29 +0900 (JST) Received: from mailb.sdl.hitachi.co.jp (sdl99b.yrl.intra.hitachi.co.jp [133.144.14.197]) by sdl99w.sdl.hitachi.co.jp (Postfix) with ESMTP id 1107253C21A; Fri, 10 Jul 2015 20:39:52 +0900 (JST) Received: from [10.198.219.30] (unknown [10.198.219.30]) by mailb.sdl.hitachi.co.jp (Postfix) with ESMTP id C0FB5495B93; Fri, 10 Jul 2015 20:39:51 +0900 (JST) 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 X-Brightmail-Tracker: AAAAAA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Nacked-by: "Eric W. Biederman" --- kernel/panic.c | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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) {