Skip to content

Commit

Permalink
[PATCH] IPoIB: Fix device removal race
Browse files Browse the repository at this point in the history
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: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Michael S. Tsirkin authored and Roland Dreier committed Aug 27, 2005
1 parent fe9e08e commit 1ad62a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static void ipoib_set_mcast_list(struct net_device *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)
Expand Down

0 comments on commit 1ad62a1

Please sign in to comment.