]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children
authorAnthony PERARD <anthony.perard@citrix.com>
Mon, 1 Jul 2019 10:50:12 +0000 (11:50 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Mon, 1 Jul 2019 14:46:46 +0000 (16:46 +0200)
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>
Message-Id: <20190701105012.25758-1-anthony.perard@citrix.com>

OvmfPkg/XenBusDxe/XenBusDxe.c

index 0e63707f507866cf05235bb754064dc4eecf84e8..7c07a96650cac7d2f2d315e0842a314789aa1c4c 100644 (file)
@@ -453,6 +453,10 @@ XenBusDxeDriverBindingStop (
       continue;\r
     }\r
 \r
+    Status = gBS->CloseProtocol (Dev->ControllerHandle, &gXenIoProtocolGuid,\r
+                    Dev->This->DriverBindingHandle, ChildData->Handle);\r
+    ASSERT_EFI_ERROR (Status);\r
+\r
     Status = gBS->UninstallMultipleProtocolInterfaces (\r
                ChildData->Handle,\r
                &gEfiDevicePathProtocolGuid, ChildData->DevicePath,\r