Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4564431pja; Thu, 21 Nov 2019 21:57:59 -0800 (PST) X-Google-Smtp-Source: APXvYqy70LsKvb9/0/wyoYmXKo+F8Itl4G4XwmkNVXqkF4EM+lFu5hBU4NOYsWMxv2O3AK/LW+qE X-Received: by 2002:a17:907:216e:: with SMTP id rl14mr19779413ejb.291.1574402278893; Thu, 21 Nov 2019 21:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574402278; cv=none; d=google.com; s=arc-20160816; b=G9noOvAy1oYK/CkRSE+faC3slEO5s6XRPNJCrTDp4xLHFYd4118UlKB0xU8MwNh9UW 1xnOqsjLUcqIUtR3cQzafL5DJwgTb3m4GxmPpH+d5Fl6mfFmH4KvEzKBt09zH/ckHLaB PRpvoW8FBp0SlnkImHsyCXU/ScrOp3FIrydfEZEFEbNZJJr/Kz5pwdMhm3I9akUzqAnb 6iI5p0vmmefwBw3mm9dH3kPqH4W10LThK9PTEJ8dbVEzdjTX5vg9l1sgGw78HsfXZewm T9FskUXCL867yLMCSW7klI3fdRk/7JUf6duDbOrrtQHqEmy+ptKYuef7TaxQTxjubZ24 7QZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tUOFF0DoaoPmPNkNxYPpBofwdJjD49oa9cifuVNxn3Y=; b=TcuU+cDydHFGiYdDyy8wJFjd2qEvrg8fcc27Q3OZhmC7nRaINmihSQ1ArENUcHmBiz T9vlRAVFlKAVZdO2rpGp1CL3Gdr3Ygu6OjuJA8/9940RQl03yfXeDMPhYRBtTZX5RaUv kRb0M//OeP6hSs31RndXsrfcYhfWzoK0AupZ+YKwSZBdEcb83gVXaTAwfr6XhmQ9KIOG YiYBGGqv3YFyciI39UNzMoEnJm5lwMP+OpA4N6Fiu+5li4zpEizs+qpIl+1cpCaSWiHX EFUoc/EWgKpZxj+BfxliTYNnBSHfRWWb7Uhs79rE9T6AZXgXVNzLFK81JHKykPH9bjsU 2yeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cK5KdBqa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si4284109edc.4.2019.11.21.21.57.30; Thu, 21 Nov 2019 21:57:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cK5KdBqa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727831AbfKVFyZ (ORCPT + 99 others); Fri, 22 Nov 2019 00:54:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:59166 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728791AbfKVFxK (ORCPT ); Fri, 22 Nov 2019 00:53:10 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3BE892068F; Fri, 22 Nov 2019 05:53:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401989; bh=DqeW1U78vlTUIlsSZ6UY5jGKiwesidoeQuHKuMlvuJg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cK5KdBqaWiD+JOm/8CPRdG89yDO+nf4SDbOJcITUi1qpNBjArn70DSlmCWX6v7OOE H1p1xuEhqYlERej8cwO53i33fe4nSvxv6jQM82ALmPpwhFMM5H9NGrR+XCQMCNnCcx CbnQnksFbbxosKjgSLwnu2mYvjo2dX6KCGandiUE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: James Morse , Borislav Petkov , "Rafael J . Wysocki" , Sasha Levin , linux-acpi@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 207/219] ACPI / APEI: Don't wait to serialise with oops messages when panic()ing Date: Fri, 22 Nov 2019 00:48:58 -0500 Message-Id: <20191122054911.1750-199-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 f008ba7c9cedc..0c46b79e31b1e 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -949,7 +948,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