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

GitHub noreply at github.com
Tue Feb 17 22:26:52 UTC 2015

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

  Changed paths:
    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