]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] IPoIB: fix module removal race
authorMichael S. Tsirkin <mst@mellanox.co.il>
Mon, 12 Sep 2005 16:52:28 +0000 (09:52 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 19 Sep 2005 05:02:37 +0000 (22:02 -0700)
Since ipoib uses queue_delayed_work to run flush task on port state events,
it must flush scheduled work after unregistering the event handler.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c

index 49d120d2b92c5308e5dda9fe802a4ae9667b26ac..704f48e0b6a738dc7a9c2e3ae41751dafc1c205a 100644 (file)
@@ -1005,6 +1005,7 @@ debug_failed:
 
 register_failed:
        ib_unregister_event_handler(&priv->event_handler);
+       flush_scheduled_work();
 
 event_failed:
        ipoib_dev_cleanup(priv->dev);
@@ -1057,6 +1058,7 @@ static void ipoib_remove_one(struct ib_device *device)
 
        list_for_each_entry_safe(priv, tmp, dev_list, list) {
                ib_unregister_event_handler(&priv->event_handler);
+               flush_scheduled_work();
 
                unregister_netdev(priv->dev);
                ipoib_dev_cleanup(priv->dev);