The following fixes a crash on module unload that we saw in testing.
SA even handler does schedule_work so we must flush_scheduled_work
after deregistering event handler.
---
Flush work scheduled by sa event handler.
Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>
Index: openib/drivers/infiniband/core/sa_query.c
===================================================================
--- openib/drivers/infiniband/core/sa_query.c (revision 4985)
+++ openib/drivers/infiniband/core/sa_query.c (working copy)
@@ -955,6 +955,8 @@ static void ib_sa_remove_one(struct ib_d
ib_unregister_event_handler(&sa_dev->event_handler);
+ flush_scheduled_work();
+
for (i = 0; i <= sa_dev->end_port - sa_dev->start_port; ++i) {
ib_unregister_mad_agent(sa_dev->port[i].agent);
kref_put(&sa_dev->port[i].sm_ah->ref, free_sm_ah);
--
MST
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general