From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 7642A74003C for ; Thu, 19 Oct 2023 06:22:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=mIQp5Mmq+HmLH/j/ukc+UFbZdYZpa0T+Js7C3IyRtDQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1697696532; v=1; b=gcT1G3WRe9Le8kR0ZmLouF5CW8WsH2F7nwgNZr+9xH8AYkcgEkbd1gXP46uvL2VWCIS0p6AD GD7ENmHisSxbFJIDwloH5WJWsQFgbnyBxCYkOQuXdiZDt2m6GBxSjyZly1o6z7jGMYFthhViIHw 591/8QiHE6TfgV5smJ9vdGwI= X-Received: by 127.0.0.2 with SMTP id G1FpYY7687511xBSSV806Gdz; Wed, 18 Oct 2023 23:22:12 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.21317.1697696528851296879 for ; Wed, 18 Oct 2023 23:22:11 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="365533586" X-IronPort-AV: E=Sophos;i="6.03,236,1694761200"; d="scan'208";a="365533586" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 23:22:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10867"; a="900632429" X-IronPort-AV: E=Sophos;i="6.03,236,1694761200"; d="scan'208";a="900632429" X-Received: from cepingsx-mobl1.ccr.corp.intel.com ([10.239.49.140]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Oct 2023 23:20:03 -0700 From: "sunceping" To: devel@edk2.groups.io Cc: Ceping Sun , Gerd Hoffmann , Jiewen Yao , Min Xu Subject: [edk2-devel] [PATCH V1 2/2] OvmfPkg/AcpiPlatformDxe: Check the status to ensure no error Date: Thu, 19 Oct 2023 14:21:42 +0800 Message-Id: <20231019062142.417-3-cepingx.sun@intel.com> In-Reply-To: <20231019062142.417-1-cepingx.sun@intel.com> References: <20231019062142.417-1-cepingx.sun@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,cepingx.sun@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: fMWbcySHvYkWACNW7vgOqaS6x7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=gcT1G3WR; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Ceping Sun REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4568 The status of "AcpiProtocol->InstallAcpiTable" is overwritten before it can be used, it is better to check it before overwriting. Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Min Xu Signed-off-by: Ceping Sun --- OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c index 24c22bb646ca..7e2adcaa82d3 100644 --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c @@ -53,6 +53,11 @@ InstallCloudHvTablesTdx ( CurrentTable->Length, &TableHandle ); + if (EFI_ERROR (Status)) { + ASSERT_EFI_ERROR (Status); + return Status; + } + for (UINTN i = 0; i < CurrentTable->Length; i++) { DEBUG ((DEBUG_INFO, " %x", *((UINT8 *)CurrentTable + i))); } -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109793): https://edk2.groups.io/g/devel/message/109793 Mute This Topic: https://groups.io/mt/102055425/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-