diff options
author | Yuri Ershov <ext-yuri.ershov@nokia.com> | 2010-06-29 07:08:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-28 16:24:01 -0400 |
commit | c4c322941ce0d7e2b7b8794ad70683123d9cb26a (patch) | |
tree | 05e21ce160325f8bbcec70abff35977fadd01ee2 /net/wireless | |
parent | d080e2755d840ede60128cc914a070868ebabc1e (diff) |
cfg80211: Update of regulatory request initiator handling
In some cases there could be possible dereferencing freed pointer. The
update is intended to avoid this issue.
Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/reg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index ec4e76f95044..f180db0de66c 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -1306,6 +1306,7 @@ static void reg_process_hint(struct regulatory_request *reg_request) | |||
1306 | { | 1306 | { |
1307 | int r = 0; | 1307 | int r = 0; |
1308 | struct wiphy *wiphy = NULL; | 1308 | struct wiphy *wiphy = NULL; |
1309 | enum nl80211_reg_initiator initiator = reg_request->initiator; | ||
1309 | 1310 | ||
1310 | BUG_ON(!reg_request->alpha2); | 1311 | BUG_ON(!reg_request->alpha2); |
1311 | 1312 | ||
@@ -1325,7 +1326,7 @@ static void reg_process_hint(struct regulatory_request *reg_request) | |||
1325 | /* This is required so that the orig_* parameters are saved */ | 1326 | /* This is required so that the orig_* parameters are saved */ |
1326 | if (r == -EALREADY && wiphy && | 1327 | if (r == -EALREADY && wiphy && |
1327 | wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) | 1328 | wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) |
1328 | wiphy_update_regulatory(wiphy, reg_request->initiator); | 1329 | wiphy_update_regulatory(wiphy, initiator); |
1329 | out: | 1330 | out: |
1330 | mutex_unlock(®_mutex); | 1331 | mutex_unlock(®_mutex); |
1331 | mutex_unlock(&cfg80211_mutex); | 1332 | mutex_unlock(&cfg80211_mutex); |