[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/6] tools/xenstored: use atexit to close interfaces
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Mon, 20 Sep 2021 09:17:29 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=tqyd/H6DW3LiP/1acj21isINZYh0GarHjLSg8u38J38=; b=Q137pt7mtrgaYgJeuZY4nWZi88ljXDHq9hghSZRb5hJuJQtQK0h2X/sMcGVS06oB6lszskOUMI4bg0j5relDdZuE9A54JlGB9QashoBBQ/dtam0LVOnAyqa/SOd/Ir9a/kFXbOokgRQNdkra84GZVFNVKl1b1Bn2pqgyDOHlnqaZ0xcJ+0jgl9SuezTYo2RTgrWxWH3aQgQ36LxAhj1E9hlYexDMkoOvVCsbmxc6izIke0KKUzeD9UmwffZhMfaP5QL8TB1tjQqacJ1gr37QGRf4V9WY9JRQdZP0IkRXSh6x4lebQ/COdW0OPLE0z16QfewsgPv1PKRU3YIvt6Zg2g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kqd3DSpvHa1LkMVVAEp4kW8L2haJk1rgi58pdr8W4FOA/c4ksaYVMlCIepb9Gt57V/1D/etJRgQIgABXTABsxeqAcT7D5YpZk7j75b1A0f2EMhztKIxm3u9P7BpMNzdmG7U0+40sCxwSnSnGGDvbO3IYqNZa6op9LxSDYHYEklPARfr9xrJdiVgOrUXwKuQr2M+S7zAQTqS0MWwsPda/gQfM4pdpjSf+UNiIpQhSLj1FwBLn1t0ZQoq3/rheW27xL6kpOY57v/DoV3dH6Hflq5xB7VU31xMCuQdQJ0I+26dp3gyPf3MXYf3sMrJNsLr8V8yT0yFyimNlp6XNPRNMzg==
- Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>
- Delivery-date: Mon, 20 Sep 2021 07:17:59 +0000
- Ironport-data: A9a23:EMdIwKvn5nmCx0l2oxb+pFsBSOfnVIJZMUV32f8akzHdYApBsoF/q tZmKW7QOfyPYGCnLdgia4uw8RlX6MXVyt5jGQRk+StmFXsS+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHpJZS5LwbZj29Y524DhWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NpluYKREQYVAIb3vM8QDCtZAmJQY7cb5+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DJoQQt2sm1TjEJf0nXYrCU+PB4towMDIY25sTRK6HP ZRxhTxHNyTGRgYUa3QtBcw1sMG0viTBehlEkQfAzUYwyzeKl1EguFT3C/LXdcaNXt59hVuDq yTN+GGRKhMHMN2SzxKV/3TqgfXA9QvkXKoCGbv+8eRl6HWDy2pWBBAIWF+TpfiillX4S99ZM 1YT+Cclse417kPDZtjiXTWorXicpBkeVtFMVeog52mwJrH8uljDQDJeF3gYNYJg5JReqSEWO kGhk83IXT1TjpaubVmQqYWVvHCcZzJIMjpXDcMbdjfp8+UPsalq0EmWHo0yQfbv5jHmMWqvm GHR9UDSk51W1JRShvvhpTgrlhrx/sChc+Ij2unAsotJB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pmLgrWe8FvxxmXT55NZlJ/IzcZCPtWFjowwJi/3ggilSYx9U/mpvSwzosuo9FE2+e O87isIDoBW0Tf8b2u1qRzi103J1ysv0WbrzRuijX7qsaXCNXsHIvsEobgcXgrS6kImst05+r lMxXilu51eCg6FtDjh5vDTPisa13ackD4Hq6o+nnZfWYwRZPt6tooE5n5YF58GAWbT9J0nKu 9zF8vRjcwmP29yV0qp/VWH/ebcHEjaRny9Mw0/U42uondrdUlCvgslLJd1pAZFyHo/I6M0kd gsfJ4Y042mdfVmH56VMt1xNvdfOla9Mi4kD1jiVGgPNJt3c04l+KSHq4nc2omRCeg1Jd0J6d L8bG8=
- Ironport-sdr: oPNN69iHYSAK2c8QO6B0HPuKrKvLnpdp3HKkwJhvrUiIRh2srOUSdSUolLlcKotmg1YFwmjNUF IobPR59vae2KT64RDMbObSa3IGL9Jw0ji4UlS6LLY+mta3nLeTiD7hPSVqsoJcTl/mvdlhBkLh 2zvP6+8/Ic6Zj0G5WmRADSgrnywCWGtAjVWdxvH8Xu4nOAv06DJghAnEp5ucmJByshc9qjDM1L uYpdf44F9d2DsfchPBV1MkxYYYH7Ea46Wf8Rq1zaO9venMWPsk99NXnistMr2Qy6ioNvC8Dexg E8BoK2K9gznXyWHCjCyierj2
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Sep 17, 2021 at 05:46:23PM +0200, Roger Pau Monne wrote:
> Exploiting the talloc clean up routines to close the Xen interfaces
> is cumbersome, specially when atexit can be used to the same effect.
>
> Convert xc and gnttab to use atexit which allows to drop one
> indirection from the storing variables.
>
> No functional change intended.
>
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
This patch is missing the following chunk:
diff --git a/tools/xenstore/xenstored_minios.c
b/tools/xenstore/xenstored_minios.c
index c94493e52a..9b050c7e02 100644
--- a/tools/xenstore/xenstored_minios.c
+++ b/tools/xenstore/xenstored_minios.c
@@ -49,12 +49,12 @@ evtchn_port_t xenbus_evtchn(void)
void *xenbus_map(void)
{
- return xengnttab_map_grant_ref(*xgt_handle, xenbus_master_domid(),
+ return xengnttab_map_grant_ref(xgt_handle, xenbus_master_domid(),
GNTTAB_RESERVED_XENSTORE, PROT_READ|PROT_WRITE);
}
void unmap_xenbus(void *interface)
{
- xengnttab_unmap(*xgt_handle, interface, 1);
+ xengnttab_unmap(xgt_handle, interface, 1);
}
|