[PATCH] ACPI: APEI: GHES: Fix severity check in ghes_log_hwerr()

From: Breno Leitao

Date: Fri Oct 30 2026 - 08:34:24 EST


ghes_log_hwerr() is meant to count recoverable GHES errors in
hwerror_data[], but it skips them and counts informational records
instead. As a result, recoverable CPU, memory, CXL and vendor-specific
errors reported through GHES never show up in a vmcore.

ghes_do_proc() passes ghes_log_hwerr() the record severity after
ghes_severity() has converted it to a GHES_SEV_* value.
ghes_log_hwerr() compares it against CPER_SEV_RECOVERABLE, which is 0
in the CPER enum and matches GHES_SEV_NO, so only informational records
pass and GHES_SEV_RECOVERABLE ones return early.

Compare against GHES_SEV_RECOVERABLE instead.

Recoverable PCIe errors that ghes_handle_aer() hands to AER are also
counted by pci_dev_aer_stats_incr(), so with the check fixed they are
counted twice under HWERR_RECOV_PCI. That is not addressed here.

Fixes: 3fa805c37dd4 ("vmcoreinfo: track and log recoverable hardware errors")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Breno Leitao <leitao@xxxxxxxxxx>
---
drivers/acpi/apei/ghes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 663dc2e601cf72..5d888c82efeaa3 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -899,7 +899,7 @@ EXPORT_SYMBOL_NS_GPL(cxl_cper_kfifo_get, "CXL");

static void ghes_log_hwerr(int sev, guid_t *sec_type)
{
- if (sev != CPER_SEV_RECOVERABLE)
+ if (sev != GHES_SEV_RECOVERABLE)
return;

if (guid_equal(sec_type, &CPER_SEC_PROC_ARM) ||

---
base-commit: a39c950806213f6861d00f90729acaaa21f2d95a
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
change-id: 20261030-ghes-hwerr-sev-e440624108b6

Best regards,
--
Breno Leitao <leitao@xxxxxxxxxx>