public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by childs
@ 2019-06-28 16:16 Anthony PERARD
  2019-06-30 10:56 ` Laszlo Ersek
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony PERARD @ 2019-06-28 16:16 UTC (permalink / raw)
  To: devel
  Cc: Jordan Justen, Laszlo Ersek, Ard Biesheuvel, Julien Grall,
	Anthony PERARD

In XenBusDxe, the XenBusAddDevice() opens the gXenIoProtocolGuid on
behalf of child controllers. It is never closed and prevent from
uninstalling the protocol.

Close it were we stop all the childs in XenBusDxe->Stop().

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

diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.c b/OvmfPkg/XenBusDxe/XenBusDxe.c
index 0e63707f50..fac6f3a09d 100644
--- a/OvmfPkg/XenBusDxe/XenBusDxe.c
+++ b/OvmfPkg/XenBusDxe/XenBusDxe.c
@@ -453,6 +453,11 @@ 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-01 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-28 16:16 [PATCH] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by childs Anthony PERARD
2019-06-30 10:56 ` Laszlo Ersek
2019-07-01 10:48   ` Anthony PERARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox