aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg2012-12-03 17:59:24 +0100
committerJohannes Berg2013-01-03 13:01:22 +0100
commit9027b1493b57a6a8f9f56741e4c4189048ea5633 (patch)
tree9a5ac9bba155417560d07b130250015b58772ae5 /net
parent1a9193185f462a51815fe48491f8a6fb6b942551 (diff)
regulatory: remove useless locking on exit
It would be a major problem if anything were to run concurrently while the module is being unloaded so remove the locking that doesn't help anything. Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/reg.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index cf2fb3425a63..cf4386fade8a 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2382,34 +2382,29 @@ void regulatory_exit(void)
cancel_work_sync(&reg_work);
cancel_delayed_work_sync(&reg_timeout);
+ /* Lock to suppress warnings */
mutex_lock(&cfg80211_mutex);
mutex_lock(&reg_mutex);
-
reset_regdomains(true);
+ mutex_unlock(&cfg80211_mutex);
+ mutex_unlock(&reg_mutex);
dev_set_uevent_suppress(&reg_pdev->dev, true);
platform_device_unregister(reg_pdev);
- spin_lock_bh(&reg_pending_beacons_lock);
list_for_each_entry_safe(reg_beacon, btmp, &reg_pending_beacons, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}
- spin_unlock_bh(&reg_pending_beacons_lock);
list_for_each_entry_safe(reg_beacon, btmp, &reg_beacon_list, list) {
list_del(&reg_beacon->list);
kfree(reg_beacon);
}
- spin_lock(&reg_requests_lock);
list_for_each_entry_safe(reg_request, tmp, &reg_requests_list, list) {
list_del(&reg_request->list);
kfree(reg_request);
}
- spin_unlock(&reg_requests_lock);
-
- mutex_unlock(&reg_mutex);
- mutex_unlock(&cfg80211_mutex);
}