Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B6DCC43603 for ; Wed, 4 Dec 2019 18:07:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 268C620675 for ; Wed, 4 Dec 2019 18:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575482827; bh=WbGhciv/qtk73dVy7tm29B/NrK/nbLd9KuYwwCP2gxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=XWxaRsydIQr5ymXV60vPdCsvO4Vyb/ZL6TXObYDi3VX57Ex3ByfcAIa25kgJ1UeaQ FkPNYxgOaFNYQNFuu3aZWyOqVRbJbQzdvOm4frSp5Cbp3Il4+yFoLdeOg8r0V0Suts ncRUYhHdhKQm6dCbsFdWUVsklcVNAJ4GfeIXhyPg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730686AbfLDSHG (ORCPT ); Wed, 4 Dec 2019 13:07:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:56326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729039AbfLDSHF (ORCPT ); Wed, 4 Dec 2019 13:07:05 -0500 Received: from localhost (unknown [217.68.49.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6388D206DF; Wed, 4 Dec 2019 18:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575482824; bh=WbGhciv/qtk73dVy7tm29B/NrK/nbLd9KuYwwCP2gxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=euvaVx0ussl4iv/ZGgRkSKvNkJqSrUtodz4jsaUh/NcskhXT5RKr1H1nr0TgG3yj7 e8Bl4bveiv4MsGT7RQXQbfifTJG8u9+a6qqxNvM1UCoU5VUvMrcVL5DWJ9kZpy7I0t qow1dPGOO3E4lWUzfckCdELt1Fy5pzmsypR0fbho= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Borislav Petkov , James Morse , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.14 150/209] ACPI / APEI: Dont wait to serialise with oops messages when panic()ing Date: Wed, 4 Dec 2019 18:56:02 +0100 Message-Id: <20191204175333.828341942@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175321.609072813@linuxfoundation.org> References: <20191204175321.609072813@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: James Morse [ Upstream commit 78b0b690f6558ed788dccafa45965325dd11ba89 ] oops_begin() exists to group printk() messages with the oops message printed by die(). To reach this caller we know that platform firmware took this error first, then notified the OS via NMI with a 'panic' severity. Don't wait for another CPU to release the die-lock before panic()ing, our only goal is to print this fatal error and panic(). This code is always called in_nmi(), and since commit 42a0bb3f7138 ("printk/nmi: generic solution for safe printk in NMI"), it has been safe to call printk() from this context. Messages are batched in a per-cpu buffer and printed via irq-work, or a call back from panic(). Link: https://patchwork.kernel.org/patch/10313555/ Acked-by: Borislav Petkov Signed-off-by: James Morse Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/apei/ghes.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 5889f6407fea8..9c31c7cd5cb5e 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -936,7 +935,6 @@ static int ghes_notify_nmi(unsigned int cmd, struct pt_regs *regs) sev = ghes_severity(ghes->estatus->error_severity); if (sev >= GHES_SEV_PANIC) { - oops_begin(); ghes_print_queued_estatus(); __ghes_panic(ghes); } -- 2.20.1