From nobody Sun May 19 15:17:03 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=red-soft.ru Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1711716465738812.5080305108537; Fri, 29 Mar 2024 05:47:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqBdS-0005YO-Be; Fri, 29 Mar 2024 08:47:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqAap-0001Nk-Ln for qemu-devel@nongnu.org; Fri, 29 Mar 2024 07:40:21 -0400 Received: from red-soft.ru ([188.246.186.2] helo=gw.red-soft.ru) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqAag-0004Jq-Gf for qemu-devel@nongnu.org; Fri, 29 Mar 2024 07:40:13 -0400 Received: from localhost.biz (unknown [10.81.100.48]) by gw.red-soft.ru (Postfix) with ESMTPA id F2DD13E1AB8; Fri, 29 Mar 2024 14:39:54 +0300 (MSK) From: Artem Chernyshev To: David Woodhouse Cc: Artem Chernyshev , Paul Durrant , "Michael S . Tsirkin" , Marcel Apfelbaum , qemu-devel@nongnu.org, Oleg Sviridov Subject: [PATCH] hw/xen_evtchn: Initialize flush_kvm_routes Date: Fri, 29 Mar 2024 14:39:39 +0300 Message-Id: <20240329113939.257033-1-artem.chernyshev@red-soft.ru> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 184489 [Mar 29 2024] X-KLMS-AntiSpam-Version: 6.1.0.4 X-KLMS-AntiSpam-Envelope-From: artem.chernyshev@red-soft.ru X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=none X-KLMS-AntiSpam-Info: LuaCore: 14 0.3.14 5a0c43d8a1c3c0e5b0916cc02a90d4b950c01f96, {Tracking_from_domain_doesnt_match_to}, localhost.biz:7.1.1; d41d8cd98f00b204e9800998ecf8427e.com:7.1.1; red-soft.ru:7.1.1; 127.0.0.199:7.1.2, FromAlignment: s X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2024/03/29 10:56:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2024/03/29 08:22:00 #24505801 X-KLMS-AntiVirus-Status: Clean, skipped Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=188.246.186.2; envelope-from=artem.chernyshev@red-soft.ru; helo=gw.red-soft.ru X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 29 Mar 2024 08:46:49 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZM-MESSAGEID: 1711716467679100009 Content-Type: text/plain; charset="utf-8" In xen_evtchn_soft_reset() variable flush_kvm_routes can be used before being initialized. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Oleg Sviridov Signed-off-by: Artem Chernyshev Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/i386/kvm/xen_evtchn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c index a5052c0ea3..07bd0c9ab8 100644 --- a/hw/i386/kvm/xen_evtchn.c +++ b/hw/i386/kvm/xen_evtchn.c @@ -1097,7 +1097,7 @@ static int close_port(XenEvtchnState *s, evtchn_port_= t port, int xen_evtchn_soft_reset(void) { XenEvtchnState *s =3D xen_evtchn_singleton; - bool flush_kvm_routes; + bool flush_kvm_routes =3D false; int i; =20 if (!s) { --=20 2.37.3