]> err.no Git - linux-2.6/commitdiff
IB/uverbs: Flush scheduled work before unloading module
authorMichael S. Tsirkin <mst@mellanox.co.il>
Tue, 17 Jan 2006 17:41:47 +0000 (09:41 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 17 Jan 2006 17:41:47 +0000 (09:41 -0800)
uverbs might schedule work to clean up when a file is closed.  Make
sure that this work runs before allowing module text to go away.

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

index 96ea79b63df7221747e1ccd65cf1622d93dc6885..903f85a4bc0cf4dfb461d6b9daf71a2a3e7d64d8 100644 (file)
@@ -902,6 +902,7 @@ static void __exit ib_uverbs_cleanup(void)
        unregister_filesystem(&uverbs_event_fs);
        class_destroy(uverbs_class);
        unregister_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES);
+       flush_scheduled_work();
        idr_destroy(&ib_uverbs_pd_idr);
        idr_destroy(&ib_uverbs_mr_idr);
        idr_destroy(&ib_uverbs_mw_idr);