[ofa-general] [PATCH] ipiob: fix rtnl deadlock
Roland Dreier
rdreier at cisco.com
Mon Aug 4 10:44:39 PDT 2008
> ipoib_stop is called with rtnl_lock, and flushes ipoib_workqueue.
> the flush operation might wait for mcast_join_task to finish, which
> in turn might wait for rtnl_lock.
when did we introduce this bug?
> + /* Avoid deadlock with ipoib_stop */
> + while (!(ret = rtnl_trylock()) &&
> + test_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
> + yield();
> +
> + if (ret) {
> + dev_set_mtu(dev, min(priv->mcast_mtu, priv->admin_mtu));
> + rtnl_unlock();
> + } else
> + ipoib_dbg_mcast(priv, "ignoring mtu setup because device is down\n");
this is rather horrible looking... is there any way we can avoid the
loop on trylock?
- R.
More information about the general
mailing list