public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Fu, Siyuan" <siyuan.fu@intel.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [patch] MdeModulePkg/MnpDxe: Fix EBC build hang issue
Date: Fri, 2 Jun 2017 05:11:38 +0000	[thread overview]
Message-ID: <B1FF2E9001CE9041BD10B825821D5BC58B331377@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1496379925-355664-1-git-send-email-dandan.bi@intel.com>


Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>


-----Original Message-----
From: Bi, Dandan 
Sent: 2017年6月2日 13:05
To: edk2-devel@lists.01.org
Cc: Fu, Siyuan <siyuan.fu@intel.com>
Subject: [patch] MdeModulePkg/MnpDxe: Fix EBC build hang issue

Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
index d1a4cb5..e24cb75 100644
--- a/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
+++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
@@ -1,9 +1,9 @@
 /** @file
   Implementation of Managed Network Protocol private services.
 
-Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials  are licensed and made available under the terms and conditions  of the BSD License which accompanies this distribution.  The full  text of the license may be found at<BR>  http://opensource.org/licenses/bsd-license.php
@@ -233,11 +233,11 @@ MnpAddFreeTxBuf (
   NET_CHECK_SIGNATURE (MnpDeviceData, MNP_DEVICE_DATA_SIGNATURE);
   ASSERT ((Count > 0) && (MnpDeviceData->BufferLength > 0));
 
   Status = EFI_SUCCESS;
   for (Index = 0; Index < Count; Index++) {
-    TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (sizeof (MNP_TX_BUF_WRAP) + MnpDeviceData->BufferLength - 1);
+    TxBufWrap = (MNP_TX_BUF_WRAP*) AllocatePool (OFFSET_OF 
+ (MNP_TX_BUF_WRAP, TxBuf) + MnpDeviceData->BufferLength );
     if (TxBufWrap == NULL) {
       DEBUG ((EFI_D_ERROR, "MnpAddFreeTxBuf: TxBuf Alloc failed.\n"));
 
       Status = EFI_OUT_OF_RESOURCES;
       break;
--
1.9.5.msysgit.1


      reply	other threads:[~2017-06-02  5:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02  5:05 [patch] MdeModulePkg/MnpDxe: Fix EBC build hang issue Dandan Bi
2017-06-02  5:11 ` Fu, Siyuan [this message]

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=B1FF2E9001CE9041BD10B825821D5BC58B331377@SHSMSX103.ccr.corp.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