[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 11/16] acpi/ghes: don't crash QEMU if ghes GED is not found
From: |
Mauro Carvalho Chehab |
Subject: |
[PATCH v5 11/16] acpi/ghes: don't crash QEMU if ghes GED is not found |
Date: |
Wed, 4 Dec 2024 08:41:19 +0100 |
Make error handling within ghes_record_cper_errors() consistent,
i.e. instead abort just print a error in case ghes GED is not found.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/acpi/ghes.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/ghes.c b/hw/acpi/ghes.c
index 414a4a1ee00e..2df5ddf68a13 100644
--- a/hw/acpi/ghes.c
+++ b/hw/acpi/ghes.c
@@ -371,7 +371,10 @@ void ghes_record_cper_errors(const void *cper, size_t len,
acpi_ged_state = ACPI_GED(object_resolve_path_type("", TYPE_ACPI_GED,
NULL));
- g_assert(acpi_ged_state);
+ if (!acpi_ged_state) {
+ error_setg(errp, "Can't find ACPI_GED object");
+ return;
+ }
ags = &acpi_ged_state->ghes_state;
start_addr = le64_to_cpu(ags->ghes_addr_le);
--
2.47.1
- [PATCH v5 00/16] Prepare GHES driver to support error injection, Mauro Carvalho Chehab, 2024/12/04
- [PATCH v5 03/16] acpi/ghes: simplify the per-arch caller to build HEST table, Mauro Carvalho Chehab, 2024/12/04
- [PATCH v5 04/16] acpi/ghes: better handle source_id and notification, Mauro Carvalho Chehab, 2024/12/04
- [PATCH v5 05/16] acpi/ghes: Fix acpi_ghes_record_errors() argument, Mauro Carvalho Chehab, 2024/12/04
- [PATCH v5 11/16] acpi/ghes: don't crash QEMU if ghes GED is not found,
Mauro Carvalho Chehab <=
- [PATCH v5 10/16] acpi/ghes: better name GHES memory error function, Mauro Carvalho Chehab, 2024/12/04
- [PATCH v5 12/16] acpi/ghes: rename etc/hardware_error file macros, Mauro Carvalho Chehab, 2024/12/04
- [PATCH v5 13/16] acpi/ghes: better name the offset of the hardware error firmware, Mauro Carvalho Chehab, 2024/12/04
[PATCH v5 08/16] acpi/ghes: don't check if physical_address is not zero, Mauro Carvalho Chehab, 2024/12/04