diff options
author | David S. Miller <davem@davemloft.net> | 2022-08-26 11:43:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-08-26 11:43:20 +0100 |
commit | 4ba9d38bb5a3255390dc15d8ac81f656a968273c (patch) | |
tree | 1dae03ef538991b5e0c4174a668d4e44571d1574 /net/mac80211/ibss.c | |
parent | 4c612826bec1441214816827979b62f84a097e91 (diff) | |
parent | 55f0a4894484e8d6ddf662f5aebbf3b4cb028541 (diff) |
Merge tag 'wireless-2022-08-26' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
Johannes Berg says:
====================
pull-request: wireless-2022-08-26
Here are a couple of fixes for the current cycle,
see the tag description below.
Just a couple of fixes:
* two potential leaks
* use-after-free in certain scan races
* warning in IBSS code
* error return from a debugfs file was wrong
* possible NULL-ptr-deref when station lookup fails
Please pull and let me know if there's any problem.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index d56890e3fabb..9b283bbc7bb4 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c @@ -530,6 +530,10 @@ int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata) sdata_assert_lock(sdata); + /* When not connected/joined, sending CSA doesn't make sense. */ + if (ifibss->state != IEEE80211_IBSS_MLME_JOINED) + return -ENOLINK; + /* update cfg80211 bss information with the new channel */ if (!is_zero_ether_addr(ifibss->bssid)) { cbss = cfg80211_get_bss(sdata->local->hw.wiphy, |