* [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp().
@ 2018-01-16 7:57 Wang Fan
2018-01-16 8:01 ` Wu, Jiaxin
0 siblings, 1 reply; 2+ messages in thread
From: Wang Fan @ 2018-01-16 7:57 UTC (permalink / raw)
To: edk2-devel; +Cc: Jiaxin Wu, Fu Siyuan
* 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 <jiaxin.wu@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <fan.wang@intel.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp().
2018-01-16 7:57 [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp() Wang Fan
@ 2018-01-16 8:01 ` Wu, Jiaxin
0 siblings, 0 replies; 2+ messages in thread
From: Wu, Jiaxin @ 2018-01-16 8:01 UTC (permalink / raw)
To: Wang, Fan, edk2-devel@lists.01.org; +Cc: Fu, Siyuan
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
> -----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 <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
> Subject: [edk2] [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT
> incorrectly used in IpIoAddIp().
>
> * 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 <jiaxin.wu@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Wang Fan <fan.wang@intel.com>
> ---
> 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
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-16 7:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 7:57 [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp() Wang Fan
2018-01-16 8:01 ` Wu, Jiaxin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox