[edk2-devel] [PATCH 22/35] OvmfPkg/XenBusDxe: fix UninstallMultipleProtocolInterfaces() call

Laszlo Ersek posted 35 patches 6 years, 4 months ago
[edk2-devel] [PATCH 22/35] OvmfPkg/XenBusDxe: fix UninstallMultipleProtocolInterfaces() call
Posted by Laszlo Ersek 6 years, 4 months ago
Unlike the InstallMultipleProtocolInterfaces() boot service, which takes
an (EFI_HANDLE*) as first parameter, the
UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as
first parameter.

This is an actual bug. It must have remained hidden until now because it's
on an error path. Fix the UninstallMultipleProtocolInterfaces() call.

Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien.grall@arm.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
    build-tested only

 OvmfPkg/XenBusDxe/XenBus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/XenBusDxe/XenBus.c b/OvmfPkg/XenBusDxe/XenBus.c
index bb8ddbc4d44d..2451e58a5961 100644
--- a/OvmfPkg/XenBusDxe/XenBus.c
+++ b/OvmfPkg/XenBusDxe/XenBus.c
@@ -210,7 +210,7 @@ XenBusAddDevice (
 
 ErrorOpenProtocolByChild:
   gBS->UninstallMultipleProtocolInterfaces (
-    &Private->Handle,
+    Private->Handle,
     &gEfiDevicePathProtocolGuid, Private->DevicePath,
     &gXenBusProtocolGuid, &Private->XenBusIo,
     NULL);
-- 
2.19.1.3.g30247aa5d201



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47409): https://edk2.groups.io/g/devel/message/47409
Mute This Topic: https://groups.io/mt/34180223/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 22/35] OvmfPkg/XenBusDxe: fix UninstallMultipleProtocolInterfaces() call
Posted by Anthony PERARD 6 years, 4 months ago
On Tue, Sep 17, 2019 at 09:49:22PM +0200, Laszlo Ersek wrote:
> Unlike the InstallMultipleProtocolInterfaces() boot service, which takes
> an (EFI_HANDLE*) as first parameter, the
> UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as
> first parameter.
> 
> This is an actual bug. It must have remained hidden until now because it's
> on an error path. Fix the UninstallMultipleProtocolInterfaces() call.
> 
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47473): https://edk2.groups.io/g/devel/message/47473
Mute This Topic: https://groups.io/mt/34180223/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 22/35] OvmfPkg/XenBusDxe: fix UninstallMultipleProtocolInterfaces() call
Posted by Julien Grall 6 years, 4 months ago
Hi,

On 17/09/2019 20:49, Laszlo Ersek wrote:
> Unlike the InstallMultipleProtocolInterfaces() boot service, which takes
> an (EFI_HANDLE*) as first parameter, the
> UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as
> first parameter.
> 
> This is an actual bug. It must have remained hidden until now because it's
> on an error path. Fix the UninstallMultipleProtocolInterfaces() call.
> 
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Reviewed-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47476): https://edk2.groups.io/g/devel/message/47476
Mute This Topic: https://groups.io/mt/34180223/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [PATCH 22/35] OvmfPkg/XenBusDxe: fix UninstallMultipleProtocolInterfaces() call
Posted by Philippe Mathieu-Daudé 6 years, 4 months ago
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> Unlike the InstallMultipleProtocolInterfaces() boot service, which takes
> an (EFI_HANDLE*) as first parameter, the
> UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as
> first parameter.
> 
> This is an actual bug. It must have remained hidden until now because it's
> on an error path. Fix the UninstallMultipleProtocolInterfaces() call.
> 
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
> 
> Notes:
>     build-tested only
> 
>  OvmfPkg/XenBusDxe/XenBus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/XenBusDxe/XenBus.c b/OvmfPkg/XenBusDxe/XenBus.c
> index bb8ddbc4d44d..2451e58a5961 100644
> --- a/OvmfPkg/XenBusDxe/XenBus.c
> +++ b/OvmfPkg/XenBusDxe/XenBus.c
> @@ -210,7 +210,7 @@ XenBusAddDevice (
>  
>  ErrorOpenProtocolByChild:
>    gBS->UninstallMultipleProtocolInterfaces (
> -    &Private->Handle,
> +    Private->Handle,
>      &gEfiDevicePathProtocolGuid, Private->DevicePath,
>      &gXenBusProtocolGuid, &Private->XenBusIo,
>      NULL);
> 

Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47854): https://edk2.groups.io/g/devel/message/47854
Mute This Topic: https://groups.io/mt/34180223/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-