[ovs-dev] [PATCH] datapath: Don't hold dp_mutex when setting internal devs MTU.

Ben Pfaff blp at nicira.com
Sat May 1 00:09:35 UTC 2010

On Fri, Apr 30, 2010 at 05:01:28PM -0700, Ben Pfaff wrote:
> On Mon, Apr 26, 2010 at 06:30:03PM -0700, Jesse Gross wrote:
> > We currently acquire dp_mutex when we are notified that the MTU
> > of a device attached to the datapath has changed so that we can
> > set the internal devices to the minimum MTU.  However, it is not
> > required to hold dp_mutex because we already have RTNL lock and it
> > causes a deadlock, so don't do it.
> I don't see a problem with this patch.
> But I don't see the deadlock, either.  dp->mutex nests inside
> rtnl_lock, and I don't any inversion of that order being fixed here.
> I don't know why the (!(port.flags & ODP_PORT_INTERNAL)) test was
> dropped in attach_port().

Jesse pointed out the deadlock via IM: set_internal_devs_mtu() is
called with dp_mutex, which then calls vport_set_mtu(), which calls
dev_set_mtu(), which calls internal_dev_change_mtu(), which acquires
dp_mutex.  Thanks.

More information about the dev mailing list