From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 01 Jul 2019 07:55:47 -0700 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1DF1EF74A6; Mon, 1 Jul 2019 14:55:37 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (unknown [10.36.118.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFA696F947; Mon, 1 Jul 2019 14:55:35 +0000 (UTC) Subject: Re: [PATCH v2] OvmfPkg/XenBusDxe: Close XenIoProtocol openned by children To: Anthony PERARD , devel@edk2.groups.io Cc: Jordan Justen , Ard Biesheuvel , Julien Grall References: <20190701105012.25758-1-anthony.perard@citrix.com> From: "Laszlo Ersek" Message-ID: Date: Mon, 1 Jul 2019 16:55:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190701105012.25758-1-anthony.perard@citrix.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 01 Jul 2019 14:55:37 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 > 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; > } > > + 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