public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Wang Fan <fan.wang@intel.com>
To: edk2-devel@lists.01.org
Cc: Jiaxin Wu <jiaxin.wu@intel.com>, Fu Siyuan <siyuan.fu@intel.com>
Subject: [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp().
Date: Tue, 16 Jan 2018 15:57:04 +0800	[thread overview]
Message-ID: <1516089424-4348-1-git-send-email-fan.wang@intel.com> (raw)

* 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



             reply	other threads:[~2018-01-16  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16  7:57 Wang Fan [this message]
2018-01-16  8:01 ` [Patch] MdeModulePkg/DxeIpIoLib: Fixed the error ASSERT incorrectly used in IpIoAddIp() Wu, Jiaxin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516089424-4348-1-git-send-email-fan.wang@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox