All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xl: Fix assertion on domain reboot with new configuration
@ 2017-01-30 14:33 Fatih Acar
  2017-02-02 11:26 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Fatih Acar @ 2017-01-30 14:33 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, ian.jackson, Fatih Acar

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.

Signed-off-by: Fatih Acar <fatih.acar@gandi.net>
Signed-off-by: Nikita Kozlov <nikita.kozlov@gandi.net>
Signed-off-by: Vincent Legout <vincent.legout@gandi.net>
Signed-off-by: Baptiste Daroussin <baptiste.daroussin@gandi.net>
---
 tools/libxl/xl_cmdimpl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 7e8a8ae..196b8a6 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -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);
-- 
bapt is my cto


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xl: Fix assertion on domain reboot with new configuration
  2017-01-30 14:33 [PATCH] xl: Fix assertion on domain reboot with new configuration Fatih Acar
@ 2017-02-02 11:26 ` Wei Liu
  2017-02-02 12:39   ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2017-02-02 11:26 UTC (permalink / raw)
  To: Fatih Acar; +Cc: xen-devel, ian.jackson, wei.liu2

On Mon, Jan 30, 2017 at 03:33:18PM +0100, Fatih Acar wrote:
> 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.
> 
> Signed-off-by: Fatih Acar <fatih.acar@gandi.net>
> Signed-off-by: Nikita Kozlov <nikita.kozlov@gandi.net>
> Signed-off-by: Vincent Legout <vincent.legout@gandi.net>
> Signed-off-by: Baptiste Daroussin <baptiste.daroussin@gandi.net>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
>  tools/libxl/xl_cmdimpl.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 7e8a8ae..196b8a6 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -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);
> -- 
> bapt is my cto
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xl: Fix assertion on domain reboot with new configuration
  2017-02-02 11:26 ` Wei Liu
@ 2017-02-02 12:39   ` Wei Liu
  0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2017-02-02 12:39 UTC (permalink / raw)
  To: Fatih Acar; +Cc: xen-devel, ian.jackson, wei.liu2

On Thu, Feb 02, 2017 at 11:26:16AM +0000, Wei Liu wrote:
> On Mon, Jan 30, 2017 at 03:33:18PM +0100, Fatih Acar wrote:
> > 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.
> > 
> > Signed-off-by: Fatih Acar <fatih.acar@gandi.net>
> > Signed-off-by: Nikita Kozlov <nikita.kozlov@gandi.net>
> > Signed-off-by: Vincent Legout <vincent.legout@gandi.net>
> > Signed-off-by: Baptiste Daroussin <baptiste.daroussin@gandi.net>
> 
> Acked-by: Wei Liu <wei.liu2@citrix.com>

Applied.

Ian, this should be backported to all supported versions (>= 4.5 IIRC).

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-02 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 14:33 [PATCH] xl: Fix assertion on domain reboot with new configuration Fatih Acar
2017-02-02 11:26 ` Wei Liu
2017-02-02 12:39   ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.