Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3633981imu; Mon, 28 Jan 2019 08:10:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN7VjNEs1nI2AmWloSHJbsBVJUAb15CtcppAdQ21tQ7hJI+rE4L+gE6oOf4ec8XolvqkbEpo X-Received: by 2002:a17:902:20c6:: with SMTP id v6mr22575291plg.156.1548691840591; Mon, 28 Jan 2019 08:10:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691840; cv=none; d=google.com; s=arc-20160816; b=IjB1ndE9n7zPBvLB/JySQLNHexqogArLZUa9bhWQXpOECu1gGiJblDAyubJ1R5x2QA PaVmcEllL6NS50H0SLLkBGnQytzkJ4Yp1P6FJEK17FVUTWoy+87uLv7HloycZdFw0WXu +E6IGxLr4CfQvb6zPXvQLGtYUV9V7U8FBMmQHx9S6mGCDSqTQje/A8r2TgqAPunMckrz d7qWrekVOJ+T7P0PKjyyrFzaeDXfK4bHnv7DNQJ+bd8xHG6p03EnopJHq8QZZ64b+3Fi KsZGIe/X+6t2MqrHLVwlVOInEUCpGWK0qKpttsL7f80dRsE2X8GcKlc9GAGae6fRd3Xd PciA== 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=0TzfL6MUo61bdfNpMTfAaZA3MoRuDtK3MlhmzwaaWfU=; b=v6nHG8ZdynVn6Yt7oms2v749KmW/iSOuQiq+t8iHzNLmMqxoTRWjgKTfZlyQbAltxy MFWM0HATg79aYu6Y1G06l6/KhG7wbj5k0X2jheLu+S3f/gcEVRbsqLseF0JXni7sxmo4 oRaIS75s8VjLCXfeWyvPDjcJmwXUaWefCgZWVl5Tcrh66QzPwN3H58ATzBKXbBi/C9K6 hgxT+M92pCws3XP/7Q7W6273aAZHrMrjylRSRHldE5TSpzlMy6JiPN/eTQiWd05O/eUS JkU03P04nAsSnYCAkwqOLhdYY0s/paUcJfQlKVb7tAKL5n3lFu//Fqov4+Ix4+dalGKY q8Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wh2GzGuo; 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 l23si32222057pgh.533.2019.01.28.08.10.25; Mon, 28 Jan 2019 08:10:40 -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=wh2GzGuo; 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 S1732165AbfA1QJb (ORCPT + 99 others); Mon, 28 Jan 2019 11:09:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:34146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732601AbfA1QJ1 (ORCPT ); Mon, 28 Jan 2019 11:09:27 -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 CD3502084A; Mon, 28 Jan 2019 16:09:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691766; bh=kpG2va2UuuVIoujxQaCdO0RvF2LF3QJtU3l2Y8G7nN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wh2GzGuoHMzHLFxqdtIGFj80239s7LZGqiO0ASuKO55fRVf1+NpRpxEAUX0+ajC5k tF99FmCItcxAUKd2AyuIHsxPs9qbYypwFtS6v0I83gDudhe8NK8zv3KO6qdeJ7jqJD SRuCoCE/0/WK7TH+IVPmhWGPzbh0db15CawqnwLE= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Lenny Szubowicz , David Arcari , "Rafael J . Wysocki" , Sasha Levin , linux-acpi@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 210/258] ACPI/APEI: Clear GHES block_status before panic() Date: Mon, 28 Jan 2019 10:58:36 -0500 Message-Id: <20190128155924.51521-210-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 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: Lenny Szubowicz [ Upstream commit 98cff8b23ed1c763a029ee81ea300df0d153d07d ] In __ghes_panic() clear the block status in the APEI generic error status block for that generic hardware error source before calling panic() to prevent a second panic() in the crash kernel for exactly the same fatal error. Otherwise ghes_probe(), running in the crash kernel, would see an unhandled error in the APEI generic error status block and panic again, thereby precluding any crash dump. Signed-off-by: Lenny Szubowicz Signed-off-by: David Arcari Tested-by: Tyler Baicar Acked-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/apei/ghes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 02c6fd9caff7..f008ba7c9ced 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -691,6 +691,8 @@ static void __ghes_panic(struct ghes *ghes) { __ghes_print_estatus(KERN_EMERG, ghes->generic, ghes->estatus); + ghes_clear_estatus(ghes); + /* reboot to log the error! */ if (!panic_timeout) panic_timeout = ghes_panic_timeout; -- 2.19.1