aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Jackson <Ian.Jackson@eu.citrix.com>2012-12-17 11:54:52 +0000
committerIan Jackson <Ian.Jackson@eu.citrix.com>2012-12-17 11:54:52 +0000
commitcf5385ec664010c5dba329edb483c0ca375f80f0 (patch)
treec1d2e4f632b9cd96afd1a8a91f17058a2f51bb70
parent303b534f0ed7f80627d59f8eb8b916b3174e1a12 (diff)
downloadxen-cf5385ec664010c5dba329edb483c0ca375f80f0.tar.gz
xen-cf5385ec664010c5dba329edb483c0ca375f80f0.tar.bz2
xen-cf5385ec664010c5dba329edb483c0ca375f80f0.zip
libxl: revert 23428:93e17b0cd035 "avoid blktap2 deadlock"
This results in additional leakage in xenstore according to the automated tests. Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--tools/libxl/libxl_blktap2.c7
-rw-r--r--tools/libxl/libxl_device.c1
2 files changed, 1 insertions, 7 deletions
diff --git a/tools/libxl/libxl_blktap2.c b/tools/libxl/libxl_blktap2.c
index b126f8d6fa..00d8dbbee4 100644
--- a/tools/libxl/libxl_blktap2.c
+++ b/tools/libxl/libxl_blktap2.c
@@ -59,7 +59,6 @@ void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path)
char *path, *params, *type, *disk;
int err;
tap_list_t tap;
- libxl_ctx *ctx = libxl__gc_owner(gc);
path = libxl__sprintf(gc, "%s/tapdisk-params", be_path);
if (!path) return;
@@ -76,11 +75,5 @@ void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path)
err = tap_ctl_find(type, disk, &tap);
if (err < 0) return;
- /*
- * Remove the instance of the backend device to avoid a deadlock with the
- * removal of the tap device.
- */
- xs_rm(ctx->xsh, XBT_NULL, be_path);
-
tap_ctl_destroy(tap.id, tap.minor);
}
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index 8a92efa3ba..7e8fcef20d 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -251,6 +251,7 @@ int libxl__device_destroy(libxl_ctx *ctx, char *be_path, int force)
goto out;
if (atoi(state) != 4) {
libxl__device_destroy_tapdisk(&gc, be_path);
+ xs_rm(ctx->xsh, XBT_NULL, be_path);
goto out;
}