From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 C812781F29 for ; Tue, 6 Dec 2016 23:06:30 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 06 Dec 2016 23:06:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,310,1477983600"; d="scan'208";a="1078556913" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga001.fm.intel.com with ESMTP; 06 Dec 2016 23:06:30 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 6 Dec 2016 23:06:30 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 6 Dec 2016 23:06:29 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.239]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0248.002; Wed, 7 Dec 2016 15:06:26 +0800 From: "Tian, Feng" To: "Zhang, Lubo" , "edk2-devel@lists.01.org" CC: "Ye, Ting" , "Fu, Siyuan" , "Wu, Jiaxin" , "Tian, Feng" Thread-Topic: [edk2] [patch] MdeModulePkg: Fix assert in iSCSI. Thread-Index: AQHSS6BkF/MDa2uBcE6BydGLzeugIqD8GYgQ Date: Wed, 7 Dec 2016 07:06:25 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE566E58247@SHSMSX101.ccr.corp.intel.com> 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:06:30 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Feng Tian -----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