Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc76e33e authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Roland Dreier
Browse files

IB/uverbs: Flush scheduled work before unloading module



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: default avatarMichael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 47f7a071
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -902,6 +902,7 @@ static void __exit ib_uverbs_cleanup(void)
	unregister_filesystem(&uverbs_event_fs);
	unregister_filesystem(&uverbs_event_fs);
	class_destroy(uverbs_class);
	class_destroy(uverbs_class);
	unregister_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES);
	unregister_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES);
	flush_scheduled_work();
	idr_destroy(&ib_uverbs_pd_idr);
	idr_destroy(&ib_uverbs_pd_idr);
	idr_destroy(&ib_uverbs_mr_idr);
	idr_destroy(&ib_uverbs_mr_idr);
	idr_destroy(&ib_uverbs_mw_idr);
	idr_destroy(&ib_uverbs_mw_idr);