datapath: Hold dp->mutex when calling new_vport().
authorJesse Gross <jesse@nicira.com>
Wed, 29 Dec 2010 22:48:38 +0000 (14:48 -0800)
committerJesse Gross <jesse@nicira.com>
Thu, 30 Dec 2010 17:34:49 +0000 (09:34 -0800)
commitf072ebdd57ee86cdc86aac59b5d993cffc37e2e5
tree8ba66cbde14976b99d122ef7b4a53017319c90d1
parent609af740ae40b37f2c0041dd8d6ed1e6be311fee
datapath: Hold dp->mutex when calling new_vport().

On datapath creation we hold dp_mutex but not dp->mutex when
creating the vport for the datapath device.  However, there are
lockdep checks that validate that we hold dp->mutex during the call
to new_vport().  The lock isn't actually necessary in this case
because no one else can access the datapath but it's good to have
the lock assertions, so this holds dp->mutex while initializing
the datapath.

Found with lockdep.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c