Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150409
b: refs/heads/master
c: 61405e9
h: refs/heads/master
i:
  150407: 9efd1ef
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed May 20, 2009
1 parent 68ec016 commit 5546c5f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0e18f833d23afefb6751a21d14a2cd71d2d4d66
refs/heads/master: 61405e97788b1bc4e7c5be5b4ec04a73fc11bac2
5 changes: 4 additions & 1 deletion trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,6 +2570,8 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
return -EINVAL;
}

mutex_lock(&cfg80211_mutex);

if (!reg_is_valid_request(alpha2)) {
r = -EINVAL;
goto bad_reg;
Expand Down Expand Up @@ -2607,13 +2609,14 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)

BUG_ON(rule_idx != num_rules);

mutex_lock(&cfg80211_mutex);
r = set_regdom(rd);

mutex_unlock(&cfg80211_mutex);

return r;

bad_reg:
mutex_unlock(&cfg80211_mutex);
kfree(rd);
return r;
}
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ static int call_crda(const char *alpha2)
/* Used by nl80211 before kmalloc'ing our regulatory domain */
bool reg_is_valid_request(const char *alpha2)
{
assert_cfg80211_lock();

if (!last_request)
return false;

Expand Down

0 comments on commit 5546c5f

Please sign in to comment.