summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2011-08-08 18:53:48 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2011-08-08 18:53:48 -0400
commit2d47998901f17742c2b73c0e5f306d8a7a3f68d9 (patch)
tree83c46a89972a655f661fc73ac48be8c7f8f0fa24
parent8c800955b4fa8036ab32ab502ca3a45bfa9b7054 (diff)
xen_server: Add vchan structure to list before calling vchan_queue().
Fixes a crash when vchan_shutdown() is called from vchan_queue().
-rw-r--r--src/xen_server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xen_server.c b/src/xen_server.c
index c264544..6758e63 100644
--- a/src/xen_server.c
+++ b/src/xen_server.c
@@ -154,9 +154,9 @@ vchan_setup(struct xs_handle *xenstore, xc_interface* xen_xc, const char *path)
goto err;
d->client->vchan = ctrl;
+ TAILQ_INSERT_TAIL(&vchans, d, next);
vchan_queue(d);
- TAILQ_INSERT_TAIL(&vchans, d, next);
XEN_BE_LOG(NULL, 1, "Set up vchan for domain %d\n", domid);
return 0;
err: