ofproto-dpif: Don't hold mac rwlock while calling send_packet().
authorEthan Jackson <ethan@nicira.com>
Fri, 6 Sep 2013 19:51:02 +0000 (12:51 -0700)
committerEthan Jackson <ethan@nicira.com>
Tue, 10 Sep 2013 21:16:33 +0000 (14:16 -0700)
commit5542f936e769c02f72751cd1ac68ddc6de6feab1
tree2416a4fd8a3b99ce16185d17020f9bfe8df8a31d
parenta036776fc19cf321d990913fec2c1a1deef89600
ofproto-dpif: Don't hold mac rwlock while calling send_packet().

Holding the mac learning rwlock while calling send_packet() which
calls xlate_actions() is dangerous because somewhere deep in the chain
the same lock might be acquired causing a deadlock.  Though we haven't
run into this problem in testing, it seems prudent to refactor it.

Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c