[ovs-git] [openvswitch/ovs] a62c71: ofproto/bond: Fix a race condition in updating pos...

GitHub noreply at github.com
Tue Feb 17 22:55:54 UTC 2015


  Branch: refs/heads/branch-2.3
  Home:   https://github.com/openvswitch/ovs
  Commit: a62c715408caec1b8bff1861afaa45d561acab61
      https://github.com/openvswitch/ovs/commit/a62c715408caec1b8bff1861afaa45d561acab61
  Author: Andy Zhou <azhou at nicira.com>
  Date:   2015-02-17 (Tue, 17 Feb 2015)

  Changed paths:
    M AUTHORS
    M ofproto/bond.c

  Log Message:
  -----------
  ofproto/bond: Fix a race condition in updating post recirculation rules

When updating post recirc rules, rule management requires calls to
hmap APIs, which requires proper locking to ensure mutual exclsion in
accessing the hmap internal data structure. The locking currently is
missing from the output_normal() xlate path, thus causing
a race condition.

The race condition leads to segfault crash of ovs-vswitchd, with the
following stack trace:

The crash was found by adding and deleting bond interfaces repeatedly
with on-going traffic hitting the bond interfaces.  The same test was
ran over multiple days with this patch to ensure the same crash was
not seen.

The patch added the necessary lock annotation that would have caught
the bug.

Tested-by: Salvatore Cambria <salvatore.cambria at citrix.com>
Reported-by: Salvatore Cambria <salvatore.cambria at citrix.com>
Signed-off-by: Andy Zhou <azhou at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>




More information about the git mailing list