public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Tian, Feng" <feng.tian@intel.com>
To: "Zhang, Lubo" <lubo.zhang@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ye, Ting" <ting.ye@intel.com>,
	"Fu, Siyuan" <siyuan.fu@intel.com>,
	"Wu, Jiaxin" <jiaxin.wu@intel.com>,
	"Tian, Feng" <feng.tian@intel.com>
Subject: Re: [patch] MdeModulePkg: Fix assert in iSCSI.
Date: Wed, 7 Dec 2016 07:06:25 +0000	[thread overview]
Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE566E58247@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1480575516-20548-1-git-send-email-lubo.zhang@intel.com>

Reviewed-by: Feng Tian <feng.tian@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhang Lubo
Sent: Thursday, December 1, 2016 2:59 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [edk2] [patch] MdeModulePkg: Fix assert in iSCSI.

The bug is caused by using already freed memory.
If there is already an attempt and execute 'reconnect -r' command, all the ConfigFormEntry structure will be freed in IScsiDriverBindingStop, but the
mCallbackInfo->Current is not configured as null and
this pointer will be used again in IScsiFormExtractConfig.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
---
 MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
index 77ccd67..ea727af 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
@@ -1074,10 +1074,11 @@ IScsiConfigUpdateForm (
     ASSERT (EntryExisted);
 
     mNumberOfIScsiDevices--;
     RemoveEntryList (&ConfigFormEntry->Link);
     FreePool (ConfigFormEntry);
+    mCallbackInfo->Current = NULL;
   }
   //
   // Allocate space for creation of Buffer
   //
 
--
1.9.5.msysgit.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2016-12-07  7:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01  6:58 [patch] MdeModulePkg: Fix assert in iSCSI Zhang Lubo
2016-12-07  7:06 ` Tian, Feng [this message]
2016-12-07  7:46 ` Ye, Ting

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=7F1BAD85ADEA444D97065A60D2E97EE566E58247@SHSMSX101.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