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.155.175, mailfrom: anthony.perard@citrix.com) Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by groups.io with SMTP; Fri, 28 Jun 2019 09:16:24 -0700 Authentication-Results: esa6.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 (esa6.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=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.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=esa6.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 (esa6.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=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: jxCdj+4xhBSANXoA2Sdd0pPbrCsuBFvw4uJNIHhyNDMY2igv//TdQfvEmKPKsBWhXThG6IwNN5 4K2U2V2isXHp20G8Up+4wB2j14M46rP/dZoPFSnNqaEQHxLu5yu3vLZXH78fmDdU2a7MxxvrZx ILHNDNYroWDhnT1Uxpbk9GmD7xfB20ZvUdDSNY6tUXZAbqIApSRCqz9E80Z6xkzax/FNUdKr0o P+7tSEL5mPGUSXLpx8s30yqFWDT9+2+lrjKzc6oBlMUQOCzKkYKq6Nq51z44OmxaRPfSrZZd6w 2wU= X-SBRS: 2.7 X-MesageID: 2392058 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,428,1557201600"; d="scan'208";a="2392058" From: "Anthony PERARD" To: CC: Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Julien Grall , Anthony PERARD Subject: [PATCH] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by childs Date: Fri, 28 Jun 2019 17:16:06 +0100 Message-ID: <20190628161606.13141-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 prevent from uninstalling the protocol. Close it were we stop all the childs in XenBusDxe->Stop(). Signed-off-by: Anthony PERARD --- 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;=0D }=0D =0D + Status =3D gBS->CloseProtocol (Dev->ControllerHandle, &gXenIoProtocolG= uid,=0D + Dev->This->DriverBindingHandle,=0D + ChildData->Handle);=0D + ASSERT_EFI_ERROR (Status);=0D +=0D Status =3D gBS->UninstallMultipleProtocolInterfaces (=0D ChildData->Handle,=0D &gEfiDevicePathProtocolGuid, ChildData->DevicePath,=0D --=20 Anthony PERARD