From nobody Wed Apr 24 02:10:47 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1584098752; cv=none; d=zohomail.com; s=zohoarc; b=dNZ2FCXfc2BH5S7gznw0RhwlPxEJAN/i4uBTGQA8UE4S/laE65jcfiaa0QBAs8OeYA+NyfAaCdcoVAIcdtByZvODlz/2ErLXUA/sEKImOotI0or1f1ZFEksRFs5+R4pWHCUm7W8F44AOgXrdqfaL347zrYVvREWjSztc9GxftMs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584098752; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=nhB/wY5EO3R17DL1HDHgwEmdMM4OfdcEdfVYUcX3zYk=; b=Ozg9Ty3MtBR0DhIUCUbmk9XDlQNk4CegK9DASAkAwn5+6XTzbsmuXcsR7jz8aultrDjfxmsMfGXqWHJru9nOughfUi6SnsoF0CCVqRDzPL1OcNaQZTD+8lir2dEBrK9VFJCzYlHYa0hkeutj9toJ0oX+t8o3uB25ABnmcagzsco= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 15840987528901015.5374458284317; Fri, 13 Mar 2020 04:25:52 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiRO-00081s-Py; Fri, 13 Mar 2020 11:25:22 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jCiRN-00081g-GN for xen-devel@lists.xenproject.org; Fri, 13 Mar 2020 11:25:21 +0000 Received: from out4-smtp.messagingengine.com (unknown [66.111.4.28]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 528e95fc-651d-11ea-b2c4-12813bfff9fa; Fri, 13 Mar 2020 11:25:20 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 06CA8226B4; Fri, 13 Mar 2020 07:25:20 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 13 Mar 2020 07:25:20 -0400 Received: from localhost.localdomain (89-64-78-197.dynamic.chello.pl [89.64.78.197]) by mail.messagingengine.com (Postfix) with ESMTPA id 873263280059; Fri, 13 Mar 2020 07:25:18 -0400 (EDT) X-Inumbo-ID: 528e95fc-651d-11ea-b2c4-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=zzhOeL cLCNfp5McXrz+vySJLo0DljT5Z4GNhQjlwPyQ=; b=sEyqs9jKPrtGb/sfsqIEve BoqFFhCaqtjrPrE+gzTQZRNyHkypgRA/unAeL1v1kgggo4M6m1/aeDSsFmq6RtZu wSU6Uy0jNGSPvnbhaRJuip1DRaKEHq2iuWAFVQL9wwsraN/6I5jNQzxYO1QMEqDR SFixzX8SwnSkw+rDJWmq3XakVtaDwlTH/x5UxiuAi3D8zgFVMOtilVLrMxLmW7mq xY+Yy7ZtvAgd1A/2buqGCQjp6hiAGGMucUJ6540oDc7qoMnT45suoBcg7k6J18m1 Hcc6u17x8Vc41ra7hFiwYMa+tf1MVWt12By4VMfbcNCyg4y9MY0+2jE1oZv7fNeg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddvjedgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffogggtgfesthekredtredtjeenucfhrhhomheprfgrfigvlhcu ofgrrhgtiigvfihskhhiuceophgrfigvlhesihhnvhhishhisghlvghthhhinhhgshhlrg gsrdgtohhmqeenucffohhmrghinhepthhrohhusghlvgdrthhoohhlshenucfkphepkeel rdeigedrjeekrdduleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphgrfigvlhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhm X-ME-Proxy: From: =?UTF-8?q?Pawe=C5=82=20Marczewski?= To: xen-devel@lists.xenproject.org Date: Fri, 13 Mar 2020 12:25:10 +0100 Message-Id: X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH] libxl: fix cleanup bug in initiate_domain_create() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , =?UTF-8?q?Pawe=C5=82=20Marczewski?= , Ian Jackson , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Wei Liu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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=C5=82 Marczewski Reviewed-by: Ian Jackson --- This is a follow up to my previous patch, 'libxl: wait for console path bef= ore firing console_available'. We discovered the bug when running integration t= ests 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 =3D dcs->guest_config; const int restore_fd =3D dcs->restore_fd; =20 + libxl__xswait_init(&dcs->console_xswait); + domid =3D dcs->domid; libxl__domain_build_state_init(&dcs->build_state); =20 @@ -1153,8 +1155,6 @@ static void initiate_domain_create(libxl__egc *egc, if (ret) goto error_out; =20 - libxl__xswait_init(&dcs->console_xswait); - if (restore_fd >=3D 0 || dcs->soft_reset) { LOGD(DEBUG, domid, "restoring, not running bootloader"); domcreate_bootloader_done(egc, &dcs->bl, 0); --=20 2.24.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel