From: Ian Campbell <ian.campbell@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, 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>
Subject: Re: [PATCH for-4.6 2/2] libxl: fix the cleanup of the backend path when using driver domains
Date: Wed, 23 Sep 2015 09:52:34 +0100 [thread overview]
Message-ID: <1442998354.10338.216.camel@citrix.com> (raw)
In-Reply-To: <1442938993-94328-3-git-send-email-roger.pau@citrix.com>
On Tue, 2015-09-22 at 18:23 +0200, Roger Pau Monne wrote:
> 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>
> 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>
> ---
> tools/libxl/libxl_device.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
> index 51da10e..6035c6e 100644
> --- a/tools/libxl/libxl_device.c
> +++ b/tools/libxl/libxl_device.c
> @@ -595,8 +595,8 @@ int libxl__device_destroy(libxl__gc *gc,
> libxl__device *dev)
> * frontend and the backend path
> */
^ This comment is now wrong.
Otherwise the logic is correct, I think.
> 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) {
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
prev parent reply other threads:[~2015-09-23 8:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 16:23 [PATCH for-4.6 0/2] libxl: devd fixes Roger Pau Monne
2015-09-22 16:23 ` [PATCH for-4.6 1/2] libxl: fix devd removal path Roger Pau Monne
2015-09-22 16:35 ` Ian Jackson
2015-09-23 8:46 ` Ian Campbell
2015-09-23 9:36 ` Roger Pau Monné
2015-09-23 9:50 ` Ian Campbell
2015-09-22 16:23 ` [PATCH for-4.6 2/2] libxl: fix the cleanup of the backend path when using driver domains Roger Pau Monne
2015-09-22 16:45 ` Ian Jackson
2015-09-23 8:52 ` Ian Campbell [this message]
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=1442998354.10338.216.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=alex.j.velazquez@gmail.com \
--cc=ian.jackson@eu.citrix.com \
--cc=roger.pau@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).