|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.5] libxl: Domain destroy: unlock userdata earlier
commit c9b13f32dcf414e7406ed8518a20ac0022d41aa4
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Tue Mar 17 09:30:58 2015 -0600
Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Wed May 27 17:02:48 2015 +0100
libxl: Domain destroy: unlock userdata earlier
Unlock the userdata before we actually call xc_domain_destroy. This
leaves open the possibility that other libxl callers will see the
half-destroyed domain (with no devices, paused), but this is fine.
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx>
Tested-by: Jim Fehlig <jfehlig@xxxxxxxx>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
(cherry picked from commit 1c91d6fba20c1517d78076d412d33cb41f501be5)
---
tools/libxl/libxl.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 9a6faa0..0b1168c 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -1626,7 +1626,7 @@ static void devices_destroy_cb(libxl__egc *egc,
uint32_t domid = dis->domid;
char *dom_path;
char *vm_path;
- libxl__domain_userdata_lock *lock = NULL;
+ libxl__domain_userdata_lock *lock;
dom_path = libxl__xs_get_dompath(gc, domid);
if (!dom_path) {
@@ -1660,6 +1660,8 @@ static void devices_destroy_cb(libxl__egc *egc,
}
libxl__userdata_destroyall(gc, domid);
+ libxl__unlock_domain_userdata(lock);
+
rc = xc_domain_destroy(ctx->xch, domid);
if (rc < 0) {
LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, rc, "xc_domain_destroy
failed for %d", domid);
@@ -1669,7 +1671,6 @@ static void devices_destroy_cb(libxl__egc *egc,
rc = 0;
out:
- if (lock) libxl__unlock_domain_userdata(lock);
dis->callback(egc, dis, rc);
return;
}
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.5
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |