The first time revalidator checks the value - it is not initialized, so
we may end up marking valid flows for deletion.

 WARNING: MemorySanitizer: use-of-uninitialized-value
  0 0x6ee9e9 in revalidator_sweep__ ofproto/ofproto-dpif-upcall.c:3003:25
  1 0x6ed671 in revalidator_purge ofproto/ofproto-dpif-upcall.c:3056:5
  2 0x6e997d in udpif_stop_threads ofproto/ofproto-dpif-upcall.c:566:17
  3 0x6ecf05 in udpif_flush ofproto/ofproto-dpif-upcall.c:756:5
  4 0x60323e in flush ofproto/ofproto-dpif.c:2020:9
  5 0x56b10e in ofproto_flush__ ofproto/ofproto.c:1669:9
  6 0x56a67b in ofproto_destroy ofproto/ofproto.c:1821:5
  7 0x4c9012 in bridge_destroy vswitchd/bridge.c:3644:9
  8 0x4c7c13 in bridge_exit vswitchd/bridge.c:556:9
  9 0x5261a8 in main vswitchd/ovs-vswitchd.c:147:5
 10 0x7fa0bb in __libc_start_call_main
 11 0x7fa0bb in __libc_start_main@GLIBC_2.2.5
 12 0x432b24 in _start (vswitchd/ovs-vswitchd+0x432b24)

Fixes: 180ab2fd635e ("ofproto-dpif-upcall: Avoid stale ukeys leaks.")
Signed-off-by: Ilya Maximets <[email protected]>
---
 ofproto/ofproto-dpif-upcall.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c
index e7d4c2b2c..bb0c55a33 100644
--- a/ofproto/ofproto-dpif-upcall.c
+++ b/ofproto/ofproto-dpif-upcall.c
@@ -1828,6 +1828,7 @@ ukey_create__(const struct nlattr *key, size_t key_len,
     ukey->state_thread = ovsthread_id_self();
     ukey->state_where = OVS_SOURCE_LOCATOR;
     ukey->created = ukey->flow_time = time_msec();
+    ukey->missed_dumps = 0;
     memset(&ukey->stats, 0, sizeof ukey->stats);
     ukey->stats.used = used;
     ukey->dp_layer = NULL;
-- 
2.47.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to