From nobody Fri Dec 19 04:58:32 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B53BD18F2DD for ; Wed, 4 Dec 2024 07:42:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733298153; cv=none; b=XqGdzEA9CiHquKGzjvpq6ydZSujg21PPQEb8QSabKN+HUXF/BcKEJRhoOOzt1ugMlVW2abUY2qgiSumdN/wSWM8wbm+eh6JfBM/CxT/zyMGEf531oCXM5ee4mjhFcR2gXagyN3K8s/xlUJsEXyLYvRXxG/YbzIATLFXn12lqAis= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733298153; c=relaxed/simple; bh=EZFsmHMf3WbcMSlyh1u3n8d24jrZ2fM6gqwzFgnZ1EY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o0ZkK0572ZfoDZjk99Azw83mmWV5TYDxbyJWq4qmCzwWPqMqA7LKKO9yS++i6Vp0sVH38tYctFF4QY/c5uvuHAWiPB1oKBZHf1NKHarYvxbrrm6Fb/mGnNH9xqhenR9zyjdoB0sJi8qjdwD/qOlAMxicYGaZx4TeglcB1OtQqfc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XEBd8xOG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XEBd8xOG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A567C4AF09; Wed, 4 Dec 2024 07:42:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733298153; bh=EZFsmHMf3WbcMSlyh1u3n8d24jrZ2fM6gqwzFgnZ1EY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XEBd8xOGayV49WeWOwFn8wQfRHGPP9w7sohNjZh8L6XGyDbOASMSeY41VZ/Lykev/ 80zwdT/xzNQ4uM1dnCAECKCB452rlyAFsbdtrOMpa07mBDBuvVX52mdYummYAcrI6k v4fl5Pom1Js6d4C9D5OlOiMoaFLWvI6RFwuuLn2SMppxZ2EIc+j1lyypLeSZ+ezjbT zSKi7opI3jmz1EXdJNXBP+y28O4RJg0bRecMNJEMCLd+KMPYLe3yerepcK7Lm6WUZA tqduL3TVjcMMMWDwoyR3svoz93JCRxP7Tg2A6tO+yQTmn3I8m5Yitx0++0SMkp7wxI 2Ghr0hv3IDhJg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tIk1n-00000004KjM-0vha; Wed, 04 Dec 2024 08:42:31 +0100 From: Mauro Carvalho Chehab To: Igor Mammedov Cc: Jonathan Cameron , Shiju Jose , Mauro Carvalho Chehab , "Michael S. Tsirkin" , Ani Sinha , Dongjiu Geng , linux-kernel@vger.kernel.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org 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 Message-ID: <070b31b912eae803a47ab070f1ca747bd1e69e95.1733297707.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Igor Mammedov --- 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, =20 acpi_ged_state =3D 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 =3D &acpi_ged_state->ghes_state; =20 start_addr =3D le64_to_cpu(ags->ghes_addr_le); --=20 2.47.1