Re: [Xen-devel] [XEN PATCH] libxl: fix cleanup bug in initiate_domain_create()

2020-03-13 Thread Ian Jackson
Paweł Marczewski writes ("[XEN PATCH] libxl: fix cleanup bug in 
initiate_domain_create()"):
> In case of errors, we immediately call domcreate_complete()
> which cleans up the console_xswait object. Make sure it is initialized
> before we start cleanup.
> 
> Signed-off-by: Paweł Marczewski 

Reviewed-by: Ian Jackson 

I will push this in a moment.

Thanks,
Ian.

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [XEN PATCH] libxl: fix cleanup bug in initiate_domain_create()

2020-03-13 Thread Paweł Marczewski
In case of errors, we immediately call domcreate_complete()
which cleans up the console_xswait object. Make sure it is initialized
before we start cleanup.

Signed-off-by: Paweł Marczewski 
---
This is a follow up to my previous patch, 'libxl: wait for console path before
firing console_available'. We discovered the bug when running integration tests
for Qubes OS (and verified that this patch helps). Sorry for the trouble.

 tools/libxl/libxl_create.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index ada942bc8d..fc36c4263d 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -1102,6 +1102,8 @@ static void initiate_domain_create(libxl__egc *egc,
 libxl_domain_config *const d_config = dcs->guest_config;
 const int restore_fd = dcs->restore_fd;
 
+libxl__xswait_init(>console_xswait);
+
 domid = dcs->domid;
 libxl__domain_build_state_init(>build_state);
 
@@ -1153,8 +1155,6 @@ static void initiate_domain_create(libxl__egc *egc,
 if (ret)
 goto error_out;
 
-libxl__xswait_init(>console_xswait);
-
 if (restore_fd >= 0 || dcs->soft_reset) {
 LOGD(DEBUG, domid, "restoring, not running bootloader");
 domcreate_bootloader_done(egc, >bl, 0);
-- 
2.24.1


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel