From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.8535.1582091890521058159 for ; Tue, 18 Feb 2020 21:58:10 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: dandan.bi@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Feb 2020 21:58:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,459,1574150400"; d="scan'208";a="315293603" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 18 Feb 2020 21:58:09 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 18 Feb 2020 21:58:09 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 18 Feb 2020 21:58:08 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 18 Feb 2020 21:58:08 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.5]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.196]) with mapi id 14.03.0439.000; Wed, 19 Feb 2020 13:58:06 +0800 From: "Dandan Bi" To: "devel@edk2.groups.io" , "xypron.glpk@gmx.de" CC: "Jin, Eric" , Supreeth Venkatesh , Stephano Cetola , "Wu, Hao A" , "Wang, Jian J" , "Gao, Liming" , "Zeng, Star" , "Yao, Jiewen" , "Laszlo Ersek" Subject: Re: [edk2-devel] [edk2-core] [PATCH v3 1/1] MdeModulePkg: Make retval in UninstallMultipleProtocol follow Spec Thread-Topic: [edk2-devel] [edk2-core] [PATCH v3 1/1] MdeModulePkg: Make retval in UninstallMultipleProtocol follow Spec Thread-Index: AQHVaTQ0SuGRaq7p7UaUo37ULl8Ebagi/7gQ Date: Wed, 19 Feb 2020 05:58:06 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB40D41D76@SHSMSX104.ccr.corp.intel.com> References: <20190912063406.9477-1-xypron.glpk@gmx.de> In-Reply-To: <20190912063406.9477-1-xypron.glpk@gmx.de> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: dandan.bi@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable This patch seems be reviewed but not submitted. Hope it can be covered in Q= 1 stable tag. Thanks, Dandan -----Original Message----- From: devel@edk2.groups.io On Behalf Of Heinrich Sch= uchardt Sent: Thursday, September 12, 2019 2:34 PM To: EDK II Development ; Bi, Dandan Cc: Jin, Eric ; Supreeth Venkatesh ; Stephano Cetola ; Wu, Hao A ; Wang, Jian J ; Gao, Liming ; Zeng, Star ; Yao, Jiewen ; Laszlo Ersek ; Heinrich Schuchardt Subject: [edk2-devel] [edk2-core] [PATCH v3 1/1] MdeModulePkg: Make retval = in UninstallMultipleProtocol follow Spec REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1869 The UEFI spec requires that if any error occurs in UninstallMultipleProtoco= lInterfaces(), EFI_INVALID_PARAMETER is returned and not the return code of= UninstallProtocolInterface(). Signed-off-by: Heinrich Schuchardt Reviewed-by: Dandan Bi --- v3 Use @retval instead of @return. The protocols are reinstalled in the same order in which they are uninstalled. v2 Adjust the subject line. Adjust the function comments to clarify the behavior. This replaces https://edk2.groups.io/g/devel/message/46974 --- MdeModulePkg/Core/Dxe/Hand/Handle.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.c b/MdeModulePkg/Core/Dxe/Ha= nd/Handle.c index b2721b3ab2..81a13c6ae5 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Handle.c +++ b/MdeModulePkg/Core/Dxe/Hand/Handle.c @@ -802,20 +802,27 @@ Done: - /** Uninstalls a list of protocol interface in the boot services env= ironment.- This function calls UnisatllProtocolInterface() in a loop. This= is+ This function calls UninstallProtocolInterface() in a loop. This is = basically a lib function to save space. - @param Handle = The handle to uninstall the protocol+ If any errors are generated while th= e protocol interfaces are being+ uninstalled, then the protocol interfaces= uninstalled prior to the error will+ be reinstalled and EFI_INVALID_PARAM= ETER will be returned.++ @param Handle The handle to unin= stall the protocol interfaces+ from. @par= am ... EFI_GUID followed by protocol instance. A NULL- = terminates the list. The pairs are the+ = terminates the list. The pairs are the = arguments to UninstallProtocolInterface(). All = the protocols are added to Handle. - @retu= rn Status code-+ @retval EFI_SUCCESS if all protocol interfaces= where uninstalled.+ @retval EFI_INVALID_PARAMETER if any protocol interf= ace could not be+ uninstalled and an attemp= t was made to+ reinstall previously uninsta= lled protocol+ interfaces. **/ EFI_STATUS E= FIAPI@@ -864,6 +871,7 @@ CoreUninstallMultipleProtocolInterfaces ( CoreInstallProtocolInterface (&Handle, Protocol, EFI_NATIVE_INTERFAC= E, Interface); } VA_END (Args);+ Status =3D EFI_INVALID_PARAMETE= R; } return Status;--=20 2.20.1 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47177): https://edk2.groups.io/g/devel/message/47177 Mute This Topic: https://groups.io/mt/34112406/1768738 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [dandan.bi@intel.com] -= =3D-=3D-=3D-=3D-=3D-=3D