git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cfg80211: fix potential deadlock in regulatory
[pandora-kernel.git]
/
net
/
wireless
/
reg.c
diff --git
a/net/wireless/reg.c
b/net/wireless/reg.c
index
3302c56
..
d57d05b
100644
(file)
--- a/
net/wireless/reg.c
+++ b/
net/wireless/reg.c
@@
-379,7
+379,15
@@
static void reg_regdb_query(const char *alpha2)
schedule_work(®_regdb_work);
}
schedule_work(®_regdb_work);
}
+
+/* Feel free to add any other sanity checks here */
+static void reg_regdb_size_check(void)
+{
+ /* We should ideally BUILD_BUG_ON() but then random builds would fail */
+ WARN_ONCE(!reg_regdb_size, "db.txt is empty, you should update it...");
+}
#else
#else
+static inline void reg_regdb_size_check(void) {}
static inline void reg_regdb_query(const char *alpha2) {}
#endif /* CONFIG_CFG80211_INTERNAL_REGDB */
static inline void reg_regdb_query(const char *alpha2) {}
#endif /* CONFIG_CFG80211_INTERNAL_REGDB */
@@
-1361,7
+1369,7
@@
static void reg_set_request_processed(void)
spin_unlock(®_requests_lock);
if (last_request->initiator == NL80211_REGDOM_SET_BY_USER)
spin_unlock(®_requests_lock);
if (last_request->initiator == NL80211_REGDOM_SET_BY_USER)
- cancel_delayed_work
_sync
(®_timeout);
+ cancel_delayed_work(®_timeout);
if (need_more_processing)
schedule_work(®_work);
if (need_more_processing)
schedule_work(®_work);
@@
-2236,6
+2244,8
@@
int __init regulatory_init(void)
spin_lock_init(®_requests_lock);
spin_lock_init(®_pending_beacons_lock);
spin_lock_init(®_requests_lock);
spin_lock_init(®_pending_beacons_lock);
+ reg_regdb_size_check();
+
cfg80211_regdomain = cfg80211_world_regdom;
user_alpha2[0] = '9';
cfg80211_regdomain = cfg80211_world_regdom;
user_alpha2[0] = '9';