]> git.proxmox.com Git - ovs.git/commit - ofproto/ofproto-dpif-xlate.c
ofproto-dpif-xlate: Avoid deadlock on multicast snooping recursion.
authorBen Pfaff <blp@ovn.org>
Tue, 21 Aug 2018 03:25:51 +0000 (20:25 -0700)
committerBen Pfaff <blp@ovn.org>
Mon, 15 Oct 2018 16:40:23 +0000 (09:40 -0700)
commitefc93e66139150fb3836460d436c6f81f46cc72e
treeab3591d2092fc41101ea43569218b5eda8f6a9d7
parentc92ccb42bdb544dc5a9fde1fa59826563905e09b
ofproto-dpif-xlate: Avoid deadlock on multicast snooping recursion.

Until now, OVS did multicast snooping outputs holding the read-lock on
the mcast_snooping object.  This could recurse via a patch port to try to
take the write-lock on the same object, which deadlocked.  This patch fixes
the problem, by releasing the read-lock before doing any outputs.

It would probably be better to use RCU for mcast_snooping.  That would be
a bigger patch and less suitable for backporting.

Reported-by: Sameh Elsharkawy
Reported-at: https://github.com/openvswitch/ovs-issues/issues/153
Signed-off-by: Ben Pfaff <blp@ovn.org>
ofproto/ofproto-dpif-xlate.c