diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2006-01-17 09:53:51 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-01-17 09:53:51 -0800 |
commit | 0f47ae0b3ec35dc5f4723f2e0ad0f6f3f55e9bcd (patch) | |
tree | 2a77f27999f10bb4b356b53a9256088fc3bfb213 /drivers/infiniband | |
parent | cc76e33ec98ee2acab2d10828d31588d1b10f274 (diff) | |
download | op-kernel-dev-0f47ae0b3ec35dc5f4723f2e0ad0f6f3f55e9bcd.zip op-kernel-dev-0f47ae0b3ec35dc5f4723f2e0ad0f6f3f55e9bcd.tar.gz |
IB/sa_query: Flush scheduled work before unloading module
sa_query schedules work on IB asynchronous events. After
unregistering the async event handler, make sure that this work has
completed before releasing the IB device (and possibly allowing the
sa_query module text to go away).
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/sa_query.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c index acda7d6..501cc05 100644 --- a/drivers/infiniband/core/sa_query.c +++ b/drivers/infiniband/core/sa_query.c @@ -956,6 +956,8 @@ static void ib_sa_remove_one(struct ib_device *device) 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); |