Commit 6682588a authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

cfg80211: fix unregistration

The work that we cancel there requires the cfg80211_mutex,
so we can't cancel it under the mutex, which is fine, we
can just move it to after the locked section.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0e2b6286
...@@ -548,11 +548,6 @@ void wiphy_unregister(struct wiphy *wiphy) ...@@ -548,11 +548,6 @@ void wiphy_unregister(struct wiphy *wiphy)
/* unlock again before freeing */ /* unlock again before freeing */
mutex_unlock(&rdev->mtx); mutex_unlock(&rdev->mtx);
cancel_work_sync(&rdev->conn_work);
cancel_work_sync(&rdev->scan_done_wk);
kfree(rdev->scan_req);
flush_work(&rdev->event_work);
cfg80211_debugfs_rdev_del(rdev); cfg80211_debugfs_rdev_del(rdev);
/* If this device got a regulatory hint tell core its /* If this device got a regulatory hint tell core its
...@@ -564,6 +559,11 @@ void wiphy_unregister(struct wiphy *wiphy) ...@@ -564,6 +559,11 @@ void wiphy_unregister(struct wiphy *wiphy)
debugfs_remove(rdev->wiphy.debugfsdir); debugfs_remove(rdev->wiphy.debugfsdir);
mutex_unlock(&cfg80211_mutex); mutex_unlock(&cfg80211_mutex);
cancel_work_sync(&rdev->conn_work);
cancel_work_sync(&rdev->scan_done_wk);
kfree(rdev->scan_req);
flush_work(&rdev->event_work);
} }
EXPORT_SYMBOL(wiphy_unregister); EXPORT_SYMBOL(wiphy_unregister);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment