Skip to content

Commit

Permalink
ofproto-dpif-upcall: Fix use of uninitialized missed dumps counter.
Browse files Browse the repository at this point in the history
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: 180ab2f ("ofproto-dpif-upcall: Avoid stale ukeys leaks.")
Acked-by: Mike Pattrick <[email protected]>
Acked-by: Eelco Chaudron <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed Nov 29, 2024
1 parent 9fde9e7 commit bc82c01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ofproto/ofproto-dpif-upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,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;
Expand Down

0 comments on commit bc82c01

Please sign in to comment.