diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-11-21 04:44:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-21 14:45:20 -0500 |
commit | de3584bd62d87b4c250129fbc46ca52c80330add (patch) | |
tree | 834162bf0c3af2bfec813fdb696157f637b307fb /net/wireless/reg.c | |
parent | 9c8f2c42c93f415771d6d7b87a0881ba0bb72824 (diff) |
cfg80211: fix regulatory NULL dereference
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>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r-- | net/wireless/reg.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index bc1ec2c26fd0..186b7f2a27b6 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -2035,6 +2035,10 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) | |||
2035 | } | 2035 | } |
2036 | 2036 | ||
2037 | request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); | 2037 | request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); |
2038 | if (!request_wiphy) { | ||
2039 | reg_set_request_processed(); | ||
2040 | return -ENODEV; | ||
2041 | } | ||
2038 | 2042 | ||
2039 | if (!last_request->intersect) { | 2043 | if (!last_request->intersect) { |
2040 | int r; | 2044 | int r; |