xl: Fix assertion on domain reboot with new configuration
PATCH 1/1 xl: Fix assertion on domain reboot with new configuration
libxl_domain_build_info_dispose is not resetting the type field to LIBXL_DOMAIN_TYPE_INVALID. Instead, it is memseting the struct to 0 thus when libxl_domain_build_info_init_type is called after a dispose on the same struct, an assertion is triggered because type != LIBXL_DOMAIN_TYPE_INVALID. Calling libxl_domain_build_info_init makes sure the type field is correctly initialized.
--- tools/libxl/xl_cmdimpl.c | 1 + 1 file changed, 1 insertion(+)
tools/libxl/xl_cmdimpl.c +1 -0
@@ -2535,6 +2535,7 @@ static void reload_domain_config(uint32_t domid,if (t_len >0 ) {LOG ("\"xl\" configuration found, using it\n" );libxl_domain_config_dispose (d_config); +libxl_domain_config_init (d_config);parse_config_data ("<updated>" , (const char *)t_data, t_len, d_config);free (t_data);
Signature · 7 lines
bapt is my cto _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 9 lines · Fatih Acar
libxl_domain_build_info_disposeis not resetting the type field toLIBXL_DOMAIN_TYPE_INVALID. Instead, it is memseting the struct to 0 thus whenlibxl_domain_build_info_init_typeis called after a dispose on the same struct, an assertion is triggered because type !=LIBXL_DOMAIN_TYPE_INVALID. Callinglibxl_domain_build_info_initmakes sure the type field is correctly initialized.Signed-off-by Fatih Acar <[email protected]>Signed-off-by Nikita Kozlov <[email protected]>Signed-off-by Vincent Legout <[email protected]>Signed-off-by Baptiste Daroussin <[email protected]>
Quoted 19 lines
--- tools/libxl/xl_cmdimpl.c | 1 + 1 file changed, 1 insertion(+)tools/libxl/xl_cmdimpl.c +1
-0@@ -2535,6 +2535,7 @@ static void reload_domain_config(uint32_t domid,if (t_len >0 ) {LOG ("\"xl\" configuration found, using it\n" );libxl_domain_config_dispose (d_config); +libxl_domain_config_init (d_config);parse_config_data ("<updated>" , (const char *)t_data, t_len, d_config);free (t_data);Signature · 1 line
bapt is my cto
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Wei Liu
AppliedQuoted 6 lines · Wei Liu
Quoted 5 lines · Fatih Acar
libxl_domain_build_info_disposeis not resetting the type field toLIBXL_DOMAIN_TYPE_INVALID. Instead, it is memseting the struct to 0 thus whenlibxl_domain_build_info_init_typeis called after a dispose on the same struct, an assertion is triggered because type !=LIBXL_DOMAIN_TYPE_INVALID. Callinglibxl_domain_build_info_initmakes sure the type field is correctly initialized.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Fatih Acar <[email protected]>Signed-off-by Nikita Kozlov <[email protected]>Signed-off-by Vincent Legout <[email protected]>Signed-off-by Baptiste Daroussin <[email protected]>Acked-by Wei Liu <[email protected]>
Applied.
Ian, this should be backported to all supported versions (>= 4.5 IIRC).
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel