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.115; helo=mga14.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 034D4221F93C0 for ; Mon, 15 Jan 2018 23:56:29 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2018 00:01:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,367,1511856000"; d="scan'208";a="10071290" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga007.jf.intel.com with ESMTP; 16 Jan 2018 00:01:47 -0800 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 16 Jan 2018 00:01:47 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 16 Jan 2018 00:01:47 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Tue, 16 Jan 2018 16:01:45 +0800 From: "Wu, Jiaxin" To: "Wang, Fan" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" Thread-Topic: [edk2] [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp(). Thread-Index: AQHTjp+e5uOZPUJq70WDGPloGAScJaN2IzjA Date: Tue, 16 Jan 2018 08:01:44 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B72741635D2E0@SHSMSX103.ccr.corp.intel.com> References: <1516089424-4348-1-git-send-email-fan.wang@intel.com> In-Reply-To: <1516089424-4348-1-git-send-email-fan.wang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmFlNjA5NTUtYTVhNy00MzEzLTliNDctMmNmNGJiZTJkMjZmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjlYdjRod1JxYXV2c1FQR2lYc2cyMVVCUURUYXNLbmJUckY5YVNJbFhpdkk9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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:56:30 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiaxin Wu > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Wang Fan > Sent: Tuesday, January 16, 2018 3:57 PM > To: edk2-devel@lists.01.org > Cc: Fu, Siyuan ; Wu, Jiaxin > Subject: [edk2] [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT > incorrectly used in IpIoAddIp(). >=20 > * In DxeIpIo, an ASSERT check is incorrectly used in IpIoAddIp(), which r= esult > debug image hang when this API is called, this patch is to fix this iss= ue. >=20 > 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(-) >=20 > 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; >=20 > ASSERT (IpIo !=3D NULL); > + ASSERT ((IpIo->IpVersion =3D=3D IP_VERSION_4) || (IpIo->IpVersion =3D= =3D > IP_VERSION_6)); >=20 > IpInfo =3D AllocatePool (sizeof (IP_IO_IP_INFO)); > if (IpInfo =3D=3D NULL) { > return NULL; > } > - ASSERT ((IpInfo->IpVersion =3D=3D IP_VERSION_4) || (IpInfo->IpVersion = =3D=3D > IP_VERSION_6)); >=20 > // > // Init this IpInfo, set the Addr and SubnetMask to 0 before we config= ure > the IP > // instance. > // > -- > 1.9.5.msysgit.1 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel