From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by ml01.01.org (Postfix) with ESMTP id BCB1D1A1E12 for ; Mon, 1 Aug 2016 01:53:21 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 01 Aug 2016 01:53:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,454,1464678000"; d="scan'208";a="148599436" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 01 Aug 2016 01:53:20 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 1 Aug 2016 01:53:20 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 1 Aug 2016 01:53:20 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.181]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.150]) with mapi id 14.03.0248.002; Mon, 1 Aug 2016 16:53:18 +0800 From: "Ye, Ting" To: "Zhang, Lubo" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" , "Wu, Jiaxin" Thread-Topic: [patch] NetworkPkg: Fix assert issue in iSCSI driver Thread-Index: AQHR69BXm7dUwi3nmUKB09jQf0SicqAzzJKg Date: Mon, 1 Aug 2016 08:53:18 +0000 Message-ID: References: <1470040681-31668-1-git-send-email-lubo.zhang@intel.com> In-Reply-To: <1470040681-31668-1-git-send-email-lubo.zhang@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] NetworkPkg: Fix assert issue in iSCSI driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 08:53:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ye Ting =20 -----Original Message----- From: Zhang, Lubo=20 Sent: Monday, August 01, 2016 4:38 PM To: edk2-devel@lists.01.org Cc: Fu, Siyuan ; Ye, Ting ; Wu, Jia= xin Subject: [patch] NetworkPkg: Fix assert issue in iSCSI driver The bug is caused by using already freed memory. If there is already an attempt and execute 'reconnect -r' command, all the = AttemptConfig structure will be freed, but the mCallbackInfo->Current is no= t configured as null and this pointer will be used again in IScsiFormExtrac= tConfig. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo Cc: Fu Siyuan Cc: Ye Ting Cc: Wu Jiaxin --- NetworkPkg/IScsiDxe/IScsiMisc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMis= c.c index deebf5d..a39c268 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -898,10 +898,12 @@ IScsiCleanDriverData ( =20 EXIT: =20 gBS->CloseEvent (Private->ExitBootServiceEvent); =20 + mCallbackInfo->Current =3D NULL; + FreePool (Private); return Status; } =20 /** -- 1.9.5.msysgit.1