From nobody Sun Apr 6 22:13:39 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 D5AB92416A2 for ; Wed, 15 Jan 2025 12:50:41 +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=1736945441; cv=none; b=PMiIZSRgvIKmBept31x+rXkxS6UJOM/sTur/D1NjVwK+fShGinbzDo6Imyo/pGF/nyc+YWb73hOVSUm3vfHcVGqS6zfjuBwFwUNyoZmNtqKbHbcvvBW/lejM8ggYrbTrc2QFuqMWuT538U27v3ANFPs2gZhHS3CNXOa0l/ksCXs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736945441; c=relaxed/simple; bh=3C96ssj/xDlI84cd58F7mXcZmrkIiSad87IMjZPD91c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gCpUhuJBprjOAMTTJRLvjNKqXMWhwYw7Cx0KlS3y3DnaPog7qW4C0kWx6Go89BMceSMwypQQc1E4vCq/RP+1lBvm4hjA1i6pgMnyxBN4FWDOw5pWjlKmKYx+mffRJPkZh7yqqyrVe3cKsUlLtz+pUD1tMvd4fMEt/LedjR2WPQE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oO9XnvT7; 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="oO9XnvT7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D0A6C4CEE9; Wed, 15 Jan 2025 12:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736945441; bh=3C96ssj/xDlI84cd58F7mXcZmrkIiSad87IMjZPD91c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oO9XnvT70YLEUsfEk2lXxwaFW0dfWP7CALVlv0qoPszXfPqM+UBv3NoIMFVv61uxl vYRTo8XoiOO4rdvmnQNEyRhqUvRrQp9kH6G3OY/4qd5q16bbHipBkYHOKAln+cfyk/ q9SMTN4liumLpCjORhweMA9c4/7B9zEH3aWYdBmE3XGTpPsiRFyf5uDhxZZKT6ikqb xhdDwp/0ZqUDLbY0RlFYdMNdVrIOuRJquoJE63gxZy67gZ+MXxrms9F1bajX/8CRFS xf29Pvfwi9rOewnrWMsHgv/lHxrd6va9971UAhQZfaQDXp3riQMKG5mgeGQeIt08IQ 3GlFjTXaf96xg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tY2r1-00000004yG6-1JFW; Wed, 15 Jan 2025 13:50:39 +0100 From: Mauro Carvalho Chehab To: Igor Mammedov , "Michael S . Tsirkin" Cc: Jonathan Cameron , Shiju Jose , qemu-arm@nongnu.org, qemu-devel@nongnu.org, Mauro Carvalho Chehab , Ani Sinha , Dongjiu Geng , linux-kernel@vger.kernel.org Subject: [PATCH v7 11/16] acpi/ghes: don't crash QEMU if ghes GED is not found Date: Wed, 15 Jan 2025 13:50:27 +0100 Message-ID: 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 66bd98337ac7..6843ddf64b29 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