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:02 +0000 (10:13 -0700)
commit3b0c6b569f7d5957919eb170ae95c402db37186c
tree5f4017c6f5dc3d65c99793291437fa738025bc08
parenta3d1ff00de09c1ea64cab59135d6eb0d0de369b0
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