hw/xen_evtchn: Initialize flush_kvm_routes
authorArtem Chernyshev <artem.chernyshev@red-soft.ru>
Fri, 29 Mar 2024 11:39:39 +0000 (14:39 +0300)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 2 Apr 2024 14:15:07 +0000 (16:15 +0200)
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>
hw/i386/kvm/xen_evtchn.c

index a5052c0ea3d28e5e1ea8f01099ecfee2147a76ae..07bd0c9ab805d434c318bf79bb58c77b76d5e4ab 100644 (file)
@@ -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) {