[ofa-general] Re: [PATCH v2] ipoib: fix a deadlock between ipoib start/stop and child interface create/delete

Roland Dreier rdreier at cisco.com
Mon Jan 12 19:37:08 PST 2009


I think this almost works, but:

 > +	list_for_each_entry(cpriv, &priv->child_intfs, list) {
 > +		flags = cpriv->dev->flags;
 > +		new_flags = (flags & ~IFF_UP) | iffup_value;
 > +		if (flags != new_flags) {
 > +			rtnl_lock();
 > +			dev_change_flags(cpriv->dev, new_flags);
 > +			rtnl_unlock();
 > +		}
 > +	}

taking flags outside of the rtnl lock looks dubious to me, since it
could change before we get to the dev_change_flags() call.

Looking at all this old code, I have to wonder whether anyone is
depending on bringing up the main interface also bringing up all the
subinterfaces ... the simplest solution would be to let the
subinterfaces be independent.  Is there anything wrong with just
deleting the code to bring subinterfaces up/down?

 - R.





More information about the general mailing list