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.126, mailfrom: eric.dong@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Wed, 24 Apr 2019 18:55:42 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2019 18:55:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,392,1549958400"; d="scan'208";a="153537137" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga002.jf.intel.com with ESMTP; 24 Apr 2019 18:55:41 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 24 Apr 2019 18:55:39 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 24 Apr 2019 18:55:39 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.139]) with mapi id 14.03.0415.000; Thu, 25 Apr 2019 09:55:37 +0800 From: "Dong, Eric" To: "Bi, Dandan" , "devel@edk2.groups.io" CC: "Gao, Liming" , "Wu, Hao A" , "Ni, Ray" Subject: Re: [patch 2/2] MdeModulePkg/FileExplorer: Set Handle to NULL after uninstall protocol Thread-Topic: [patch 2/2] MdeModulePkg/FileExplorer: Set Handle to NULL after uninstall protocol Thread-Index: AQHU+aJndRf0sYLWQEuZAT+cbJvXZqZMIKtA Date: Thu, 25 Apr 2019 01:55:36 +0000 Message-ID: References: <20190423070039.29160-1-dandan.bi@intel.com> <20190423070039.29160-3-dandan.bi@intel.com> In-Reply-To: <20190423070039.29160-3-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: Bi, Dandan > Sent: Tuesday, April 23, 2019 3:01 PM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Dong, Eric ; > Wu, Hao A ; Ni, Ray > Subject: [patch 2/2] MdeModulePkg/FileExplorer: 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 FeDriverHandle in FileExplorerLib Constructor is > not NULL which cause InstallMultipleProtocolInterfaces failure, then ASSE= RT. > So here set FeDriverHandle to NULL after uninstalling protocols on it in = the > Destructor function to avoid this issue. >=20 > Cc: Liming Gao > Cc: Eric Dong > Cc: Hao Wu > Cc: Ruiyu Ni > Signed-off-by: Dandan Bi > --- > MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > index 27f12fcbf9..58e4910259 100644 > --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c > @@ -1,9 +1,9 @@ > /** @file > File explorer related functions. >=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 >=20 > @@ -1641,10 +1641,11 @@ FileExplorerLibDestructor ( > NULL > ); > ASSERT_EFI_ERROR (Status); >=20 > HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle); > + gFileExplorerPrivate.FeDriverHandle =3D NULL; > } >=20 > FreePool (gHiiVendorDevicePath); >=20 > return EFI_SUCCESS; > -- > 2.18.0.windows.1