From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5978E81F15 for ; Tue, 6 Dec 2016 23:46:21 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 06 Dec 2016 23:46:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,310,1477983600"; d="scan'208";a="14740837" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 06 Dec 2016 23:46:20 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 6 Dec 2016 23:46:20 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.96]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.142]) with mapi id 14.03.0248.002; Wed, 7 Dec 2016 15:46:18 +0800 From: "Ye, Ting" To: "Zhang, Lubo" , "edk2-devel@lists.01.org" CC: "Fu, Siyuan" , "Wu, Jiaxin" Thread-Topic: [edk2] [patch] MdeModulePkg: Fix assert in iSCSI. Thread-Index: AQHSS6BeU5ru7RHg8ka5iStHVzWNbKD8JKtg Date: Wed, 7 Dec 2016 07:46:18 +0000 Message-ID: References: <1480575516-20548-1-git-send-email-lubo.zhang@intel.com> In-Reply-To: <1480575516-20548-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] MdeModulePkg: Fix assert in iSCSI. 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: Wed, 07 Dec 2016 07:46: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: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Zhan= g Lubo Sent: Thursday, December 1, 2016 2:59 PM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan ; Wu, Jia= xin 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 Cc: Ye Ting Cc: Fu Siyuan Cc: Wu Jiaxin --- MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeMod= ulePkg/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); =20 mNumberOfIScsiDevices--; RemoveEntryList (&ConfigFormEntry->Link); FreePool (ConfigFormEntry); + mCallbackInfo->Current =3D NULL; } // // Allocate space for creation of Buffer // =20 -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel