"dev" <dev-boun...@openvswitch.org> wrote on 05/13/2016 01:58:43 PM:
> From: William Tu <u9012...@gmail.com> > To: dev@openvswitch.org > Date: 05/13/2016 01:59 PM > Subject: [ovs-dev] [PATCH] ovn-controller: Fix errors reported by Valgrind. > Sent by: "dev" <dev-boun...@openvswitch.org> > > Fix two errors reported by test 2026: ovn -- 3 HVs, 1 LS, 3 lports/HV. > 1. Conditional jump or move depends on uninitialised value(s) > physical_run (physical.c:366) > main (ovn-controller.c:382) > 2. Use of uninitialised value of size 8 > bitmap_set1 (bitmap.h:97) > update_ct_zones (binding.c:115) > binding_run (binding.c:228) > main (ovn-controller.c:362) > > Signed-off-by: William Tu <u9012...@gmail.com> > --- > ovn/controller/ovn-controller.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/ovn/controller/ovn-controller.c b/ovn/controller/ovn-controller.c > index f68f842..45fc33c 100644 > --- a/ovn/controller/ovn-controller.c > +++ b/ovn/controller/ovn-controller.c > @@ -323,6 +323,8 @@ main(int argc, char *argv[]) > /* Initialize connection tracking zones. */ > struct simap ct_zones = SIMAP_INITIALIZER(&ct_zones); > unsigned long ct_zone_bitmap[BITMAP_N_LONGS(MAX_CT_ZONES)]; > + memset(ct_zone_bitmap, 0x0, > + BITMAP_N_LONGS(MAX_CT_ZONES) * sizeof(unsigned long)); > bitmap_set1(ct_zone_bitmap, 0); /* Zone 0 is reserved. */ > unixctl_command_register("ct-zone-list", "", 0, 0, > ct_zone_list, &ct_zones); > -- > 2.5.0 I've not tested this with valgrind, but it certainly looks right on visual inspection and is simple enough to give it the following... Acked-by: Ryan Moats <rmo...@us.ibm.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev