[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 10/15] acpi/ghes: don't crash QEMU if ghes GED is not foun
From: |
Jonathan Cameron |
Subject: |
Re: [PATCH v3 10/15] acpi/ghes: don't crash QEMU if ghes GED is not found |
Date: |
Wed, 20 Nov 2024 14:22:50 +0000 |
On Tue, 12 Nov 2024 11:14:54 +0100
Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote:
> Make error handling within ghes_record_cper_errors() consistent,
> i.e. instead abort just print a error in case ghes GED is not found.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fair enough.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.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 1dbcbefbc2ee..e15a411b47e1 100644
> --- a/hw/acpi/ghes.c
> +++ b/hw/acpi/ghes.c
> @@ -377,7 +377,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);
- [PATCH v3 00/15] Prepare GHES driver to support error injection, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 02/15] acpi/ghes: simplify acpi_ghes_record_errors() code, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 11/15] acpi/ghes: rename etc/hardware_error file macros, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 03/15] acpi/ghes: simplify the per-arch caller to build HEST table, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 04/15] acpi/ghes: better handle source_id and notification, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 01/15] acpi/ghes: get rid of ACPI_HEST_SRC_ID_RESERVED, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 09/15] acpi/ghes: better name GHES memory error function, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 06/15] acpi/ghes: Remove a duplicated out of bounds check, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 10/15] acpi/ghes: don't crash QEMU if ghes GED is not found, Mauro Carvalho Chehab, 2024/11/12
- Re: [PATCH v3 10/15] acpi/ghes: don't crash QEMU if ghes GED is not found,
Jonathan Cameron <=
- [PATCH v3 07/15] acpi/ghes: Change the type for source_id, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 05/15] acpi/ghes: Fix acpi_ghes_record_errors() argument, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 15/15] docs: acpi_hest_ghes: fix documentation for CPER size, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 13/15] acpi/ghes: move offset calculus to a separate function, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 12/15] acpi/ghes: better name the offset of the hardware error firmware, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 08/15] acpi/ghes: make the GHES record generation more generic, Mauro Carvalho Chehab, 2024/11/12
- [PATCH v3 14/15] acpi/ghes: Change ghes fill logic to work with only one source, Mauro Carvalho Chehab, 2024/11/12