summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorArtem Chernyshev <artem.chernyshev@red-soft.ru>2024-03-29 14:39:39 +0300
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-04-02 16:15:07 +0200
commit95a36455274f519e8ebd11fbb5492cb4fe3b5068 (patch)
tree1e928e846f5ec70cfd0a7cb49e3ba0248347b019
parent0fa5eefa1643e95eefa7b7bb452565ee64b0470a (diff)
downloadfocaccia-qemu-95a36455274f519e8ebd11fbb5492cb4fe3b5068.tar.gz
focaccia-qemu-95a36455274f519e8ebd11fbb5492cb4fe3b5068.zip
hw/xen_evtchn: Initialize flush_kvm_routes
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 <oleg.sviridov@red-soft.ru>
Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240329113939.257033-1-artem.chernyshev@red-soft.ru>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r--hw/i386/kvm/xen_evtchn.c2
1 files changed, 1 insertions, 1 deletions
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 = xen_evtchn_singleton;
-    bool flush_kvm_routes;
+    bool flush_kvm_routes = false;
     int i;
 
     if (!s) {