Properly lock dp_mutex around changes to the datapath.
authorBen Pfaff <blp@nicira.com>
Tue, 30 Dec 2008 21:03:48 +0000 (13:03 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 30 Dec 2008 21:05:15 +0000 (13:05 -0800)
commit701c04342b498b0200c3b4b998eade0649a57921
treea3049679317d75e2004230eaf89340b491a0a665
parentf8b58e512857cd09b09f302ed72c9d545004d06b
Properly lock dp_mutex around changes to the datapath.

We weren't locking dp_mutex() here but it really is necessary.  See the
comment on dp_mutex itself for details.

This actually restores some of the locking removed by commit 47b8652d
"Simplify use of dp_mutex."  That commit is correct that we can take
dp_mutex at a high level in dp_genl_openflow(), but it removes locking
from functions that are not called through dp_genl_openflow(): in
particular any Netlink command other than DP_GENL_C_OPENFLOW does not
go through that function, so those commands need to acquire the mutex
themselves.
datapath/datapath.c