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: ray.ni@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Tue, 17 Sep 2019 13:16:12 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2019 13:16:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,518,1559545200"; d="scan'208";a="187562869" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 17 Sep 2019 13:16:11 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Sep 2019 13:16:11 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 17 Sep 2019 13:16:11 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.140]) with mapi id 14.03.0439.000; Wed, 18 Sep 2019 04:16:09 +0800 From: "Ni, Ray" To: Laszlo Ersek , edk2-devel-groups-io CC: "Wu, Hao A" , "Wang, Jian J" Subject: Re: [PATCH 14/35] MdeModulePkg: fix UninstallMultipleProtocolInterfaces() calls Thread-Topic: [PATCH 14/35] MdeModulePkg: fix UninstallMultipleProtocolInterfaces() calls Thread-Index: AQHVbZElbBOc4E1wd0qTpl0jyksY/KcwThPQ Date: Tue, 17 Sep 2019 20:16:08 +0000 Deferred-Delivery: Tue, 17 Sep 2019 20:16:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C2E3D15@SHSMSX104.ccr.corp.intel.com> References: <20190917194935.24322-1-lersek@redhat.com> <20190917194935.24322-15-lersek@redhat.com> In-Reply-To: <20190917194935.24322-15-lersek@redhat.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWU4MWZjZjgtMzU1NC00MTI3LTliNjgtNzAzYmE5NTZiOWEyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTkJ5aWNmbURndHJ6SmtnRVJtNTI5WTQ0UjdMODZXeGY0dlZhTUllR1NhNElNMzJsNGQzXC8yaHZKZGtKZ0F1TkEifQ== x-ctpclassification: CTP_NT 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: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni > -----Original Message----- > From: Laszlo Ersek > Sent: Tuesday, September 17, 2019 12:49 PM > To: edk2-devel-groups-io > Cc: Wu, Hao A ; Wang, Jian J ;= Ni, Ray > Subject: [PATCH 14/35] MdeModulePkg: fix UninstallMultipleProtocolInterfa= ces() calls >=20 > Unlike the InstallMultipleProtocolInterfaces() boot service, which takes > an (EFI_HANDLE*) as first parameter, the > UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as > first parameter. >=20 > These are actual bugs. They must have remained hidden until now because > they are on error paths. Fix the UninstallMultipleProtocolInterfaces() > calls. >=20 > Cc: Hao A Wu > Cc: Jian J Wang > Cc: Ray Ni > Signed-off-by: Laszlo Ersek > --- >=20 > Notes: > build-tested only >=20 > MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c | 2 +- > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c | 2 +- > MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c | 6 +++--- > MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c | 2 +- > MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c | 2 +- > MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 2 +- > MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c | 2 +- > 7 files changed, 9 insertions(+), 9 deletions(-) >=20 > diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c b/MdeModulePkg/Bus/I2c/= I2cDxe/I2cBus.c > index 2b54ec51dca0..ed33a51da252 100644 > --- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c > +++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c > @@ -720,7 +720,7 @@ Error: >=20 > if (I2cBusContext !=3D NULL) { > Status =3D gBS->UninstallMultipleProtocolInterfaces ( > - &Controller, > + Controller, > gEfiCallerIdGuid, > I2cBusContext, > NULL > diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c > b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c > index c6e401176a4b..3bde96bc9576 100644 > --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c > +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c > @@ -244,7 +244,7 @@ EnumerateNvmeDevNamespace ( > ); > if(EFI_ERROR(Status)) { > gBS->UninstallMultipleProtocolInterfaces ( > - &Device->DeviceHandle, > + Device->DeviceHandle, > &gEfiDevicePathProtocolGuid, > Device->DevicePath, > &gEfiBlockIoProtocolGuid, > diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c b/MdeModul= ePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c > index b7832c6970ad..292dd25da817 100644 > --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c > +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c > @@ -313,7 +313,7 @@ RegisterPciDevice ( > ); > if (EFI_ERROR (Status)) { > gBS->UninstallMultipleProtocolInterfaces ( > - &PciIoDevice->Handle, > + PciIoDevice->Handle, > &gEfiDevicePathProtocolGuid, > PciIoDevice->DevicePath, > &gEfiPciIoProtocolGuid, > @@ -351,7 +351,7 @@ RegisterPciDevice ( > ); > if (EFI_ERROR (Status)) { > gBS->UninstallMultipleProtocolInterfaces ( > - &PciIoDevice->Handle, > + PciIoDevice->Handle, > &gEfiDevicePathProtocolGuid, > PciIoDevice->DevicePath, > &gEfiPciIoProtocolGuid, > @@ -360,7 +360,7 @@ RegisterPciDevice ( > ); > if (HasEfiImage) { > gBS->UninstallMultipleProtocolInterfaces ( > - &PciIoDevice->Handle, > + PciIoDevice->Handle, > &gEfiLoadFile2ProtocolGuid, > &PciIoDevice->LoadFile2, > NULL > diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c b/MdeModulePkg= /Bus/Pci/PciSioSerialDxe/Serial.c > index 82db93a8b117..9fe8a482e067 100644 > --- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c > +++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c > @@ -665,7 +665,7 @@ CreateSerialDevice ( >=20 > if (EFI_ERROR (Status)) { > gBS->UninstallMultipleProtocolInterfaces ( > - &SerialDevice->Handle, > + SerialDevice->Handle, > &gEfiDevicePathProtocolGuid, SerialDevice->DevicePath, > &gEfiSerialIoProtocolGuid, &SerialDevice->SerialIo, > NULL > diff --git a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c b/MdeModulePkg/Bus/Sd/= EmmcDxe/EmmcDxe.c > index 62f18d1878bd..e2ae56c5058a 100644 > --- a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c > +++ b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c > @@ -475,7 +475,7 @@ InstallProtocolOnPartition ( > ); > if (EFI_ERROR (Status)) { > gBS->UninstallMultipleProtocolInterfaces ( > - &Partition->Handle, > + Partition->Handle, > &gEfiDevicePathProtocolGuid, > Partition->DevicePath, > &gEfiBlockIoProtocolGuid, > diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bu= s/Usb/UsbBusDxe/UsbEnumer.c > index eaa0d70024bb..cc0de52de411 100644 > --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c > +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c > @@ -159,7 +159,7 @@ UsbCreateInterface ( >=20 > if (EFI_ERROR (Status)) { > gBS->UninstallMultipleProtocolInterfaces ( > - &UsbIf->Handle, > + UsbIf->Handle, > &gEfiDevicePathProtocolGuid, > UsbIf->DevicePath, > &gEfiUsbIoProtocolGuid, > diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c > b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c > index 8c27e18cdb87..0dcbc5da2cb8 100644 > --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c > +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c > @@ -575,7 +575,7 @@ UsbMassInitMultiLun ( > if (EFI_ERROR (Status)) { > DEBUG ((EFI_D_ERROR, "UsbMassInitMultiLun: OpenUsbIoProtocol By Ch= ild (%r)\n", Status)); > gBS->UninstallMultipleProtocolInterfaces ( > - &UsbMass->Controller, > + UsbMass->Controller, > &gEfiDevicePathProtocolGuid, > UsbMass->DevicePath, > &gEfiBlockIoProtocolGuid, > -- > 2.19.1.3.g30247aa5d201 >=20