[openib-general] [PATCH] ipoib: device removal races
Michael S. Tsirkin
mst at mellanox.co.il
Mon Aug 8 08:11:42 PDT 2005
Currently we may have work scheduled in default kernel
workqueue when the device is going down.
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.
As a side note, schedule_work in ipoib_event also looks suspicios.
Cant we have it oustanding when the device is going down?
Roland, what do you say we switch that to ipoib_workqueue as well,
and add a flush after ib_unregister_event_handler?
---
Convert schedule_work to queue_work: solves system hang.
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: ipoib/ipoib_main.c
===================================================================
--- ipoib/ipoib_main.c (revision 2937)
+++ ipoib/ipoib_main.c (working copy)
@@ -672,7 +672,7 @@ static void ipoib_set_mcast_list(struct
{
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)
--
MST
More information about the general
mailing list