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 20:56:44 +0000 (13:56 -0700)
commit0165217e70501130b98ba6a5e81f91c56a2d0bd2
treee066a8a2ae0a6a988c4134491e673dfff9239c39
parentc4ea31b1e05f52bb3d692d1c4f8b9dfa92189704
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