I don't think it will work, because the lock is taken way before your
flag is set.
If the lock is taken (by rtnl that calls ipoib_stop) and the flag is
not set yet,
ipoib_mcast_join_task() will still try to take the lock, and we have a deadlock.

--Yossi

>        if (!ipoib_cm_admin_enabled(dev)) {
> -               rtnl_lock();
> +               int took_lock = 0;
> +               if (!test_bit(IPOIB_FLAG_STOPPING, &priv->flags)) {
> +                       rtnl_lock();
> +                       took_lock = 1;
> +               }
>                dev_set_mtu(dev, min(priv->mcast_mtu, priv->admin_mtu));
> -               rtnl_unlock();
> +               if (took_lock)
> +                       rtnl_unlock();
>        }
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to