diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-11-21 10:44:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-09 08:52:32 -0800 |
commit | 6cb4e0db2f318c0730f31622fc5812a19e7ff379 (patch) | |
tree | 69000748f6ec6720d82fa1dfb66f142128a35ef0 /net/wireless/reg.c | |
parent | e30922bd0c3d24c27f457a64997ed4a47161621e (diff) | |
download | kernel_samsung_smdk4412-6cb4e0db2f318c0730f31622fc5812a19e7ff379.zip kernel_samsung_smdk4412-6cb4e0db2f318c0730f31622fc5812a19e7ff379.tar.gz kernel_samsung_smdk4412-6cb4e0db2f318c0730f31622fc5812a19e7ff379.tar.bz2 |
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/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 213103e..3c5ddeaf 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2026,6 +2026,10 @@ static int __set_regdom(const struct ieee80211_regdomain *rd) } request_wiphy = wiphy_idx_to_wiphy(last_request->wiphy_idx); + if (!request_wiphy) { + reg_set_request_processed(); + return -ENODEV; + } if (!last_request->intersect) { int r; |