From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: eric.dong@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Wed, 24 Apr 2019 18:55:35 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2019 18:55:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,392,1549958400"; d="scan'208";a="294328695" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 24 Apr 2019 18:55:34 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 24 Apr 2019 18:55:34 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 24 Apr 2019 18:55:34 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.149]) with mapi id 14.03.0415.000; Thu, 25 Apr 2019 09:55:32 +0800 From: "Dong, Eric" To: "devel@edk2.groups.io" , "Bi, Dandan" CC: "Gao, Liming" , "Wu, Hao A" , "Ni, Ray" Subject: Re: [edk2-devel] [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol Thread-Topic: [edk2-devel] [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to NULL after uninstall protocol Thread-Index: AQHU+aJeThCQTC+tr0CJWeK8TfU8UqZMIJGQ Date: Thu, 25 Apr 2019 01:55:31 +0000 Message-ID: References: <20190423070039.29160-1-dandan.bi@intel.com> <20190423070039.29160-2-dandan.bi@intel.com> In-Reply-To: <20190423070039.29160-2-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: eric.dong@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong > -----Original Message----- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Dandan Bi > Sent: Tuesday, April 23, 2019 3:01 PM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Dong, Eric = ; > Wu, Hao A ; Ni, Ray > Subject: [edk2-devel] [patch 1/2] MdeModulePkg/BMMUiLib: Set Handle to > NULL after uninstall protocol >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1728 >=20 > Currently Emulator meets ASSERT when enter setup->Continue->enter > setup. > When re-enter setup, the BmmDriverHandle in BMMUiLib Constructor is not > NULL which cause InstallMultipleProtocolInterfaces failure, then ASSERT.= So > here set BmmDriverHandle to NULL after uninstalling protocols on it in > Destructor function to avoid this issue. >=20 > Cc: Liming Gao > Cc: Eric Dong > Cc: Hao Wu > Cc: Ruiyu Ni > Signed-off-by: Dandan Bi > --- > .../Library/BootMaintenanceManagerUiLib/BootMaintenance.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git > a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc > e.c > b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc > e.c > index 2167d3a5e8..28592f9f47 100644 > --- > a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc > e.c > +++ > b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc > e.c > @@ -1,9 +1,9 @@ > /** @file > The functions for Boot Maintainence Main menu. >=20 > -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ >=20 > #include "BootMaintenanceManager.h" > @@ -1761,9 +1761,10 @@ BootMaintenanceManagerUiLibDestructor ( > &mBmmCallbackInfo->BmmConfigAccess, > NULL > ); >=20 > FreePool (mBmmCallbackInfo->LoadContext); > + mBmmCallbackInfo->BmmDriverHandle =3D NULL; >=20 > return EFI_SUCCESS; > } >=20 > -- > 2.18.0.windows.1 >=20 >=20 >=20