From patchwork Mon Jan 30 14:33:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fatih Acar X-Patchwork-Id: 9545499 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A21D9604A8 for ; Mon, 30 Jan 2017 14:35:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B78125F31 for ; Mon, 30 Jan 2017 14:35:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 903112811E; Mon, 30 Jan 2017 14:35:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2AE6825F31 for ; Mon, 30 Jan 2017 14:35:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYD1M-0005mJ-Le; Mon, 30 Jan 2017 14:33:28 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cYD1K-0005m8-G9 for xen-devel@lists.xenproject.org; Mon, 30 Jan 2017 14:33:26 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 70/32-25657-5BE4F885; Mon, 30 Jan 2017 14:33:25 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeJIrShJLcpLzFFi42K56bb9ku5Wv/4 Ig4XruSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1ow5zbfZC85wVixddIqtgbGNo4uRi0NIYAWj xLMZh5i7GDk5JARsJaaf+AxkcwDZ/BJrDylDhMUkVm14zQph80qcnnKcDaRXQmA1o8SsttdsE IMeMEr0dsxlhXC6mCQmXfjCCNLCJqAucerXDDBbREBJ4t6qyUwgNrNAuETf6VawzcICXhKvt7 xiAtnMIqAqsfR+LojJK+AscWGeKsRiOYmb5zqZJzDyL2BkWMWoUZxaVJZapGtkoZdUlJmeUZK bmJmja2hgrJebWlycmJ6ak5hUrJecn7uJERg+9QwMjDsY20/4HWKU5GBSEuXt+9gXIcSXlJ9S mZFYnBFfVJqTWnyIUYaDQ0mC97pPf4SQYFFqempFWmYOMJBh0hIcPEoivOa+QGne4oLE3OLMd IjUKUZFKXFeMZCEAEgiozQPrg0WPZcYZaWEeRkZGBiEeApSi3IzS1DlXzGKczAqCfPOBJnCk5 lXAjf9FdBiJqDF7q/6QBaXJCKkpBoYQ9KjVc3vcFlvWxsx5Xf0NRe9h4s/qK4p7D4X4BomabV wWuXy6JlfF2yZ8H3XMQdZ06rjNkr+UzQDdV/vlln//IPGkZgd7Iy/Sg8rvHtgxDvtzKRZt3j2 1MT+Onzjcj0X18IVKRvn9/1rYUupPPuhfN295GtMwXZyR0SXcnqd8Z0duXN14gnpdCWW4oxEQ y3mouJEAAcnfnWZAgAA X-Env-Sender: fatih.acar@gandi.net X-Msg-Ref: server-6.tower-31.messagelabs.com!1485786804!56703473!1 X-Originating-IP: [217.70.183.210] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10216 invoked from network); 30 Jan 2017 14:33:25 -0000 Received: from mail4.gandi.net (HELO gandi.net) (217.70.183.210) by server-6.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 30 Jan 2017 14:33:25 -0000 Received: from mfiltercorp2.gandi.net (mfiltercorp2.gandi.net [217.70.183.154]) by gandi.net (Postfix) with ESMTP id 72068E39B9; Mon, 30 Jan 2017 15:33:24 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfiltercorp2.gandi.net Received: from gandi.net ([IPv6:::ffff:217.70.183.210]) by mfiltercorp2.gandi.net (mfiltercorp2.gandi.net [::ffff:217.70.183.154]) (amavisd-new, port 10024) with ESMTP id YCggoHgnDf9a; Mon, 30 Jan 2017 15:33:22 +0100 (CET) Received: from fatih-ThinkPad-X240.0x35.net (fatih.gandi.net [217.70.181.46]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by gandi.net (Postfix) with ESMTPSA id C362AE39D1; Mon, 30 Jan 2017 15:33:22 +0100 (CET) From: Fatih Acar To: xen-devel@lists.xenproject.org Date: Mon, 30 Jan 2017 15:33:18 +0100 Message-Id: <1485786798-9566-1-git-send-email-fatih.acar@gandi.net> X-Mailer: git-send-email 2.7.4 Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, Fatih Acar Subject: [Xen-devel] [PATCH] xl: Fix assertion on domain reboot with new configuration X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Nikita Kozlov Signed-off-by: Vincent Legout Signed-off-by: Baptiste Daroussin Acked-by: Wei Liu --- 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("", (const char *)t_data, t_len, d_config); free(t_data);