[ovs-dev] [PATCH 4/7] datapath: Hold dp->mutex when calling new_vport().
Ben Pfaff
blp at nicira.com
Thu Dec 30 17:29:14 UTC 2010
On Wed, Dec 29, 2010 at 03:41:32PM -0800, Jesse Gross wrote:
> 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 wraps the call to new_vport() with
> dp->mutex.
>
> Found with lockdep.
>
> Signed-off-by: Jesse Gross <jesse at nicira.com>
I'd be tempted to take the mutex as soon as we initialize it. It would
be more obviously correct, I think.
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev
mailing list