Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp34732imu; Wed, 19 Dec 2018 13:09:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/VvB2yZjw4bStA7ejry6n+d6kDk6ktOkjZIr0WV8Mk+P4ZDW4zHICK5ASxB03zOTggaO2g5 X-Received: by 2002:a17:902:8346:: with SMTP id z6mr21582745pln.340.1545253768989; Wed, 19 Dec 2018 13:09:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545253768; cv=none; d=google.com; s=arc-20160816; b=w/LbV9Kvro5HBUIxDOIlnnvsgrGnNmH9tZoidUdpgd2O+9Ga9lL3Imq14dM5BBmhAl fu4HxQeSxVXNxTNII/HH9bTmeMtTxC4sDHLlaELYg3VaYluGRLxTAZSxtOT84IBZfx+H cmiqvcOrpkL095kEutM22Tk0jsCw1BkGQKs/W6HbNf7E/6sdD8voGBdTshjQIKvHE6J8 NBt3yrPMrjm2Ivhz5QDOK8sSTETSwrxr7CogaaocYr7FAgASoRSJNleIUT0LycWvu594 mpNMIWNrH2UbWBh9bmQdOSbm++GaP0RhvIMTrbo+mvc2Ms2HiBdJ+0jARAZlfeN/i4gP Og3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=i3TYxcKazBZ4J4xLToQ/flmTo35gS6SeXKSA7DFiXJg=; b=hTxNCQrnAwfuQKzO2Alutdija36KFDVMJAgtEEE8Jg+2Vq6Gl1Q4JTBTlerAUgUc76 p3gTX3dVdI5tmXa/HtvEbNyk6rBfwy7Uoqvafno6jPvXnl5ttkvSIkMlalQXIZROIVhM x+nxJy21MlrZ7mxzZZ8U2wsiZSyq2dypbcHJdnTDacpmjWgWQAZkKM9SlwrI+XR1zWPM 7OFvYPnDupEDwivuTQXwKKoCMMH8iDecxO6m/Z/YgC/IFv00Us3I9a2QfKnK/MQPHzLk uPzTokd2C7HpWaKBh+0E8QnAqUYon3PQRkEqYFJ4B47JpKyDrtwSbeN+DqQURIpbLYUy dVOw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g25si15115362pgm.14.2018.12.19.13.09.12; Wed, 19 Dec 2018 13:09:28 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729275AbeLSQwX (ORCPT + 99 others); Wed, 19 Dec 2018 11:52:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56596 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727818AbeLSQwW (ORCPT ); Wed, 19 Dec 2018 11:52:22 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DB7F13268C; Wed, 19 Dec 2018 16:52:22 +0000 (UTC) Received: from dba62.ml3.eng.bos.redhat.com (dba62.ml3.eng.bos.redhat.com [10.19.176.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2549B6B465; Wed, 19 Dec 2018 16:52:21 +0000 (UTC) From: David Arcari To: Linux ACPI Cc: Lenny Szubowicz , David Arcari , "Rafael J. Wysocki" , Len Brown , Tony Luck , Borislav Petkov , "Eric W. Biederman" , Alexandru Gagniuc , linux-kernel@vger.kernel.org Subject: [PATCH] ACPI/APEI: Clear GHES block_status before panic() Date: Wed, 19 Dec 2018 11:50:52 -0500 Message-Id: <1545238252-79630-1-git-send-email-darcari@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 19 Dec 2018 16:52:22 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lenny Szubowicz 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 Cc: Rafael J. Wysocki Cc: Len Brown Cc: Tony Luck Cc: Borislav Petkov Cc: "Eric W. Biederman" Cc: Alexandru Gagniuc Cc: linux-kernel@vger.kernel.org --- 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 02c6fd9..f008ba7 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; -- 1.8.3.1