[edk2-devel] [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children

Anthony PERARD posted 1 patch 4 years, 9 months ago
Failed in applying to current master (apply log)
OvmfPkg/XenBusDxe/XenBusDxe.c | 4 ++++
1 file changed, 4 insertions(+)
[edk2-devel] [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children
Posted by Anthony PERARD 4 years, 9 months ago
In XenBusDxe, the XenBusAddDevice() opens the gXenIoProtocolGuid on
behalf of child controllers. It is never closed and prevents us from
uninstalling the protocol.

Close it where we stop all the children in XenBusDxe->Stop().

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
 OvmfPkg/XenBusDxe/XenBusDxe.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.c b/OvmfPkg/XenBusDxe/XenBusDxe.c
index 0e63707f50..7c07a96650 100644
--- a/OvmfPkg/XenBusDxe/XenBusDxe.c
+++ b/OvmfPkg/XenBusDxe/XenBusDxe.c
@@ -453,6 +453,10 @@ XenBusDxeDriverBindingStop (
       continue;

     }

 

+    Status = gBS->CloseProtocol (Dev->ControllerHandle, &gXenIoProtocolGuid,

+                    Dev->This->DriverBindingHandle, ChildData->Handle);

+    ASSERT_EFI_ERROR (Status);

+

     Status = gBS->UninstallMultipleProtocolInterfaces (

                ChildData->Handle,

                &gEfiDevicePathProtocolGuid, ChildData->DevicePath,

-- 
Anthony PERARD


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

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

Re: [edk2-devel] [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children
Posted by Laszlo Ersek 4 years, 9 months ago
On 07/01/19 12:50, Anthony PERARD wrote:
> In XenBusDxe, the XenBusAddDevice() opens the gXenIoProtocolGuid on
> behalf of child controllers. It is never closed and prevents us from
> uninstalling the protocol.
> 
> Close it where we stop all the children in XenBusDxe->Stop().
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> ---
>  OvmfPkg/XenBusDxe/XenBusDxe.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.c b/OvmfPkg/XenBusDxe/XenBusDxe.c
> index 0e63707f50..7c07a96650 100644
> --- a/OvmfPkg/XenBusDxe/XenBusDxe.c
> +++ b/OvmfPkg/XenBusDxe/XenBusDxe.c
> @@ -453,6 +453,10 @@ XenBusDxeDriverBindingStop (
>        continue;
>      }
>  
> +    Status = gBS->CloseProtocol (Dev->ControllerHandle, &gXenIoProtocolGuid,
> +                    Dev->This->DriverBindingHandle, ChildData->Handle);
> +    ASSERT_EFI_ERROR (Status);
> +
>      Status = gBS->UninstallMultipleProtocolInterfaces (
>                 ChildData->Handle,
>                 &gEfiDevicePathProtocolGuid, ChildData->DevicePath,
> 

Commit 64ef66ba8b41.

Thanks
Laszlo

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

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