Re: [Xen-devel] [PATCH for-4.6 2/2] libxl: fix the cleanup of the backend path when using driver domains
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é > Reported-by: Alex Velazquez > Cc: Alex Velazquez > Cc: Ian Jackson > Cc: Ian Campbell > Cc: Wei Liu > --- > 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
Re: [Xen-devel] [PATCH for-4.6 2/2] libxl: fix the cleanup of the backend path when using driver domains
Roger Pau Monne writes ("[PATCH for-4.6 2/2] libxl: fix the cleanup of the backend path when using driver domains"): > 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é > Reported-by: Alex Velazquez Acked-by: Ian Jackson I would like to have a second review before committing, and also we should wait for a release ack from Wei. Thanks, Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] [PATCH for-4.6 2/2] libxl: fix the cleanup of the backend path when using driver domains
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é Reported-by: Alex Velazquez Cc: Alex Velazquez Cc: Ian Jackson Cc: Ian Campbell Cc: Wei Liu --- 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 */ 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 -- 1.9.5 (Apple Git-50.3) ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel