IPoIB: Fix deadlock between dev_change_flags() and __ipoib_dev_flush()
[deliverable/linux.git] / drivers / infiniband / ulp / ipoib / ipoib_netlink.c
index f81abe16cf093d6c74ad31dd179f03f7dc90b997..c29b5c8388331458bb2a2caf85580d76031f1dcb 100644 (file)
@@ -142,10 +142,10 @@ static void ipoib_unregister_child_dev(struct net_device *dev, struct list_head
        priv = netdev_priv(dev);
        ppriv = netdev_priv(priv->parent);
 
-       mutex_lock(&ppriv->vlan_mutex);
+       down_write(&ppriv->vlan_rwsem);
        unregister_netdevice_queue(dev, head);
        list_del(&priv->list);
-       mutex_unlock(&ppriv->vlan_mutex);
+       up_write(&ppriv->vlan_rwsem);
 }
 
 static size_t ipoib_get_size(const struct net_device *dev)
This page took 0.024041 seconds and 5 git commands to generate.