From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=fan.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 056B4221F93A9 for ; Mon, 15 Jan 2018 23:51:47 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2018 23:57:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,367,1511856000"; d="scan'208";a="10584020" Received: from fanwang2-hp.ccr.corp.intel.com ([10.239.9.33]) by fmsmga007.fm.intel.com with ESMTP; 15 Jan 2018 23:57:06 -0800 From: Wang Fan To: edk2-devel@lists.01.org Cc: Jiaxin Wu , Fu Siyuan Date: Tue, 16 Jan 2018 15:57:04 +0800 Message-Id: <1516089424-4348-1-git-send-email-fan.wang@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp(). X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2018 07:51:48 -0000 * In DxeIpIo, an ASSERT check is incorrectly used in IpIoAddIp(), which result debug image hang when this API is called, this patch is to fix this issue. Cc: Jiaxin Wu Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan --- MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c index 0c6681d..66c7fec 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -1740,16 +1740,16 @@ IpIoAddIp ( EFI_STATUS Status; IP_IO_IP_INFO *IpInfo; EFI_EVENT Event; ASSERT (IpIo != NULL); + ASSERT ((IpIo->IpVersion == IP_VERSION_4) || (IpIo->IpVersion == IP_VERSION_6)); IpInfo = AllocatePool (sizeof (IP_IO_IP_INFO)); if (IpInfo == NULL) { return NULL; } - ASSERT ((IpInfo->IpVersion == IP_VERSION_4) || (IpInfo->IpVersion == IP_VERSION_6)); // // Init this IpInfo, set the Addr and SubnetMask to 0 before we configure the IP // instance. // -- 1.9.5.msysgit.1