提交 1ad62a19 编写于 作者: M Michael S. Tsirkin 提交者: Roland Dreier

[PATCH] IPoIB: Fix device removal race

Currently we may have work scheduled in default kernel workqueue when
the device is going down.  The device could get freed before this
workqueue gets serviced.  I am actually seeing this causing system
hangs.

The following patch fixes this by using ipoib_workqueue which gets
flushed when the device is going down.
Signed-off-by: NMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 fe9e08e1
...@@ -672,7 +672,7 @@ static void ipoib_set_mcast_list(struct net_device *dev) ...@@ -672,7 +672,7 @@ static void ipoib_set_mcast_list(struct net_device *dev)
{ {
struct ipoib_dev_priv *priv = netdev_priv(dev); struct ipoib_dev_priv *priv = netdev_priv(dev);
schedule_work(&priv->restart_task); queue_work(ipoib_workqueue, &priv->restart_task);
} }
static void ipoib_neigh_destructor(struct neighbour *n) static void ipoib_neigh_destructor(struct neighbour *n)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册