Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+6 -9
+1 -5
net/mac80211/mlme.c
··· 2959 2959 (auth_transaction == 2 && 2960 2960 ifmgd->auth_data->expected_transaction == 2)) { 2961 2961 if (!ieee80211_mark_sta_auth(sdata, bssid)) 2962 - goto out_err; 2962 + return; /* ignore frame -- wait for timeout */ 2963 2963 } else if (ifmgd->auth_data->algorithm == WLAN_AUTH_SAE && 2964 2964 auth_transaction == 2) { 2965 2965 sdata_info(sdata, "SAE peer confirmed\n"); ··· 2967 2967 } 2968 2968 2969 2969 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 */ 2974 2970 } 2975 2971 2976 2972 #define case_WLAN(type) \
+1 -1
net/mac80211/rx.c
··· 4114 4114 4115 4115 lockdep_assert_held(&local->sta_mtx); 4116 4116 4117 - list_for_each_entry_rcu(sta, &local->sta_list, list) { 4117 + list_for_each_entry(sta, &local->sta_list, list) { 4118 4118 if (sdata != sta->sdata && 4119 4119 (!sta->sdata->bss || sta->sdata->bss != sdata->bss)) 4120 4120 continue;
+3 -2
net/wireless/nl80211.c
··· 20 20 #include <linux/netlink.h> 21 21 #include <linux/nospec.h> 22 22 #include <linux/etherdevice.h> 23 + #include <linux/if_vlan.h> 23 24 #include <net/net_namespace.h> 24 25 #include <net/genetlink.h> 25 26 #include <net/cfg80211.h> ··· 4801 4800 err = nl80211_parse_he_obss_pd( 4802 4801 info->attrs[NL80211_ATTR_HE_OBSS_PD], 4803 4802 &params.he_obss_pd); 4804 - if (err) 4805 - return err; 4803 + goto out; 4806 4804 } 4807 4805 4808 4806 nl80211_calculate_ap_params(&params); ··· 4823 4823 } 4824 4824 wdev_unlock(wdev); 4825 4825 4826 + out: 4826 4827 kfree(params.acl); 4827 4828 4828 4829 return err;
+1 -1
net/wireless/reg.c
··· 2276 2276 break; 2277 2277 } 2278 2278 2279 - if (IS_ERR(reg_rule)) { 2279 + if (IS_ERR_OR_NULL(reg_rule)) { 2280 2280 pr_debug("Disabling freq %d MHz as custom regd has no rule that fits it\n", 2281 2281 chan->center_freq); 2282 2282 if (wiphy->regulatory_flags & REGULATORY_WIPHY_SELF_MANAGED) {