aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-11-21 04:44:00 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-09 11:52:32 -0500
commit6cb4e0db2f318c0730f31622fc5812a19e7ff379 (patch)
tree69000748f6ec6720d82fa1dfb66f142128a35ef0 /net/wireless
parente30922bd0c3d24c27f457a64997ed4a47161621e (diff)
cfg80211: fix regulatory NULL dereference
commit de3584bd62d87b4c250129fbc46ca52c80330add upstream. By the time userspace returns with a response to the regulatory domain request, the wiphy causing the request might have gone away. If this is so, reject the update but mark the request as having been processed anyway. Cc: Luis R. Rodriguez <lrodriguez@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/reg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 213103e3f99..3c5ddeafb93 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2026,6 +2026,10 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
2026 } 2026 }
2027 2027
2028 request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); 2028 request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx);
2029 if (!request_wiphy) {
2030 reg_set_request_processed();
2031 return -ENODEV;
2032 }
2029 2033
2030 if (!last_request->intersect) { 2034 if (!last_request->intersect) {
2031 int r; 2035 int r;