Skip to content

Commit

Permalink
cfg80211: Update of regulatory request initiator handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yuri Ershov authored and John W. Linville committed Jul 28, 2010
1 parent d080e27 commit c4c3229
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
{
int r = 0;
struct wiphy *wiphy = NULL;
enum nl80211_reg_initiator initiator = reg_request->initiator;

BUG_ON(!reg_request->alpha2);

Expand All @@ -1325,7 +1326,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)
/* This is required so that the orig_* parameters are saved */
if (r == -EALREADY && wiphy &&
wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY)
wiphy_update_regulatory(wiphy, reg_request->initiator);
wiphy_update_regulatory(wiphy, initiator);
out:
mutex_unlock(&reg_mutex);
mutex_unlock(&cfg80211_mutex);
Expand Down

0 comments on commit c4c3229

Please sign in to comment.