Skip to content

Commit 3614d05

Browse files
committed
Merge tag 'mac80211-for-net-2020-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Johannes Berg ==================== A few fixes: * remove a double mutex-unlock * fix a leak in an error path * NULL pointer check * include if_vlan.h where needed * avoid RCU list traversal when not under RCU ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 823d81b + 253216f commit 3614d05

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

‎net/mac80211/mlme.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,18 +2959,14 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
29592959
(auth_transaction == 2 &&
29602960
ifmgd->auth_data->expected_transaction == 2)) {
29612961
if (!ieee80211_mark_sta_auth(sdata, bssid))
2962-
goto out_err;
2962+
return; /* ignore frame -- wait for timeout */
29632963
} else if (ifmgd->auth_data->algorithm == WLAN_AUTH_SAE &&
29642964
auth_transaction == 2) {
29652965
sdata_info(sdata, "SAE peer confirmed\n");
29662966
ifmgd->auth_data->peer_confirmed = true;
29672967
}
29682968

29692969
cfg80211_rx_mlme_mgmt(sdata->dev, (u8 *)mgmt, len);
2970-
return;
2971-
out_err:
2972-
mutex_unlock(&sdata->local->sta_mtx);
2973-
/* ignore frame -- wait for timeout */
29742970
}
29752971

29762972
#define case_WLAN(type) \

‎net/mac80211/rx.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4114,7 +4114,7 @@ void __ieee80211_check_fast_rx_iface(struct ieee80211_sub_if_data *sdata)
41144114

41154115
lockdep_assert_held(&local->sta_mtx);
41164116

4117-
list_for_each_entry_rcu(sta, &local->sta_list, list) {
4117+
list_for_each_entry(sta, &local->sta_list, list) {
41184118
if (sdata != sta->sdata &&
41194119
(!sta->sdata->bss || sta->sdata->bss != sdata->bss))
41204120
continue;

‎net/wireless/nl80211.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/netlink.h>
2121
#include <linux/nospec.h>
2222
#include <linux/etherdevice.h>
23+
#include <linux/if_vlan.h>
2324
#include <net/net_namespace.h>
2425
#include <net/genetlink.h>
2526
#include <net/cfg80211.h>
@@ -4800,8 +4801,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
48004801
err = nl80211_parse_he_obss_pd(
48014802
info->attrs[NL80211_ATTR_HE_OBSS_PD],
48024803
&params.he_obss_pd);
4803-
if (err)
4804-
return err;
4804+
goto out;
48054805
}
48064806

48074807
nl80211_calculate_ap_params(&params);
@@ -4823,6 +4823,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
48234823
}
48244824
wdev_unlock(wdev);
48254825

4826+
out:
48264827
kfree(params.acl);
48274828

48284829
return err;

‎net/wireless/reg.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2276,7 +2276,7 @@ static void handle_channel_custom(struct wiphy *wiphy,
22762276
break;
22772277
}
22782278

2279-
if (IS_ERR(reg_rule)) {
2279+
if (IS_ERR_OR_NULL(reg_rule)) {
22802280
pr_debug("Disabling freq %d MHz as custom regd has no rule that fits it\n",
22812281
chan->center_freq);
22822282
if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) {

0 commit comments

Comments
 (0)