From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: citrix.com, ip: 216.71.145.153, mailfrom: anthony.perard@citrix.com) Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by groups.io with SMTP; Mon, 01 Jul 2019 03:50:34 -0700 Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: DfyOM9HgXRM3aubaEyi7SKB//V8Z70QUBAbmNUgbi2R7FZhNgo0nwxsAw43vw8OjmD0k6TFjar wwvAe0NYxOK+jhgLZr4EFKw5UI93oPQRDv7m4TA9olXzVtCfXcWCom6ApypN1UFlIGGqQicVOw SkiANl/aS9aXwib4RACNHCnWZBBfDdxo+6a9qJQ7ChFCKNPaPl+AWoieOeruWOK8qwJSH+C4M5 TMdVZJjm8FBc9teHqVLJ5WzCgXCLbTnuBs2J9NtBrl4+9tiKTB8c6hIoP5wE4j3MrqFBOOcRNV N2w= X-SBRS: 2.7 X-MesageID: 2425670 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,439,1557201600"; d="scan'208";a="2425670" From: "Anthony PERARD" To: CC: Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Julien Grall , Anthony PERARD Subject: [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children Date: Mon, 1 Jul 2019 11:50:12 +0100 Message-ID: <20190701105012.25758-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Return-Path: anthony.perard@citrix.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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 Reviewed-by: Laszlo Ersek --- 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;=0D }=0D =0D + Status =3D gBS->CloseProtocol (Dev->ControllerHandle, &gXenIoProtocolG= uid,=0D + Dev->This->DriverBindingHandle, ChildData->Handle);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D Status =3D gBS->UninstallMultipleProtocolInterfaces (=0D ChildData->Handle,=0D &gEfiDevicePathProtocolGuid, ChildData->DevicePath,=0D --=20 Anthony PERARD