Reviewed-by: Ray Ni <ray...@intel.com> > -----Original Message----- > From: Laszlo Ersek <ler...@redhat.com> > Sent: Tuesday, September 17, 2019 12:49 PM > To: edk2-devel-groups-io <devel@edk2.groups.io> > Cc: Wu, Hao A <hao.a...@intel.com>; Wang, Jian J <jian.j.w...@intel.com>; Ni, > Ray <ray...@intel.com> > Subject: [PATCH 14/35] MdeModulePkg: fix > UninstallMultipleProtocolInterfaces() calls > > Unlike the InstallMultipleProtocolInterfaces() boot service, which takes > an (EFI_HANDLE*) as first parameter, the > UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as > first parameter. > > These are actual bugs. They must have remained hidden until now because > they are on error paths. Fix the UninstallMultipleProtocolInterfaces() > calls. > > Cc: Hao A Wu <hao.a...@intel.com> > Cc: Jian J Wang <jian.j.w...@intel.com> > Cc: Ray Ni <ray...@intel.com> > Signed-off-by: Laszlo Ersek <ler...@redhat.com> > --- > > Notes: > build-tested only > > 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(-) > > 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: > > if (I2cBusContext != NULL) { > Status = 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/MdeModulePkg/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 ( > > 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/Bus/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 ( > > 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 Child > (%r)\n", Status)); > gBS->UninstallMultipleProtocolInterfaces ( > - &UsbMass->Controller, > + UsbMass->Controller, > &gEfiDevicePathProtocolGuid, > UsbMass->DevicePath, > &gEfiBlockIoProtocolGuid, > -- > 2.19.1.3.g30247aa5d201 >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47426): https://edk2.groups.io/g/devel/message/47426 Mute This Topic: https://groups.io/mt/34180215/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-