From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Alex Velazquez <alex.j.velazquez@gmail.com>,
Wei Liu <wei.liu2@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v2 for-4.6 2/2] libxl: fix the cleanup of the backend path when using driver domains
Date: Wed, 23 Sep 2015 12:06:56 +0200 [thread overview]
Message-ID: <1443002816-95720-3-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1443002816-95720-1-git-send-email-roger.pau@citrix.com>
With the current libxl implementation the control domain will remove both
the frontend and the backend xenstore paths of a device that's handled by a
driver domain. This is incorrect, since the driver domain possibly needs to
access the backend path in order to perform the disconnection and cleanup of
the device.
Fix this by making sure the control domain only cleans the frontend path,
leaving the backend path to be cleaned by the driver domain. Note that if
the device is not handled by a driver domain the control domain will perform
the removal of both the frontend and the backend paths.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reported-by: Alex Velazquez <alex.j.velazquez@gmail.com>
Cc: Alex Velazquez <alex.j.velazquez@gmail.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v1:
- Fix comment to match the code change.
- While there, also s/charge for/charge of/g.
---
tools/libxl/libxl_device.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index 85a3662..8bb5e93 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -591,15 +591,15 @@ int libxl__device_destroy(libxl__gc *gc, libxl__device *dev)
if (domid == LIBXL_TOOLSTACK_DOMID) {
/*
- * The toolstack domain is in charge for removing both the
- * frontend and the backend path
+ * The toolstack domain is in charge of removing the
+ * frontend path.
*/
libxl__xs_path_cleanup(gc, t, fe_path);
- libxl__xs_path_cleanup(gc, t, be_path);
- } else if (dev->backend_domid == domid) {
+ }
+ if (dev->backend_domid == domid) {
/*
- * The driver domain is in charge for removing what it can
- * from the backend path
+ * The driver domain is in charge of removing what it can
+ * from the backend path.
*/
libxl__xs_path_cleanup(gc, t, be_path);
}
--
1.9.5 (Apple Git-50.3)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-09-23 10:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 10:06 [PATCH v2 for-4.6 0/2] libxl: devd fixes Roger Pau Monne
2015-09-23 10:06 ` [PATCH v2 for-4.6 1/2] libxl: fix devd removal path Roger Pau Monne
2015-09-23 11:08 ` Ian Campbell
2015-09-23 10:06 ` Roger Pau Monne [this message]
2015-09-23 11:09 ` [PATCH v2 for-4.6 2/2] libxl: fix the cleanup of the backend path when using driver domains Ian Campbell
2015-09-23 13:20 ` [PATCH v2 for-4.6 0/2] libxl: devd fixes Wei Liu
2015-09-23 14:10 ` Roger Pau Monné
2015-09-23 15:21 ` Wei Liu
2015-09-24 11:30 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443002816-95720-3-git-send-email-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=alex.j.velazquez@gmail.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).