connmgr: Use 'ofproto_mutex' to protect ofconns from being destroyed.
authorBen Pfaff <blp@nicira.com>
Fri, 11 Oct 2013 17:04:32 +0000 (10:04 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 11 Oct 2013 17:13:50 +0000 (10:13 -0700)
commitdb380609b9a41f50e642cd931f6840fbcb11f5bb
tree0ca84a408fbe4517df8cf151eb0979f14dfe0f3b
parent9b2d5cfb873d0e989bd011d8f9cd5a2939381de7
connmgr: Use 'ofproto_mutex' to protect ofconns from being destroyed.

Code in the ofproto-dpif miss handler threads can currently access
ofconns, sending flow_removed and flow monitor messages due to NXAST_LEARN
actions.  Nothing currently protects those threads from accessing ofconns
that are in the process of being destroyed.  This commit adds protection
'ofproto_mutex', which NXAST_LEARN already takes.

Later patches will address other races that remain.

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