diff options
author | Johannes Berg <johannes.berg@intel.com> | 2021-05-17 17:47:17 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2021-06-30 15:48:57 +0300 |
commit | a7abf2f48669fafe7324bf0ad19bd0d9c88d0ce1 (patch) | |
tree | d728e002f1a70ca96eaf839a5e4840273b6e279d | |
parent | e9695e4d26d210b81c9c8a11f6983c1190a3a9cc (diff) | |
download | linux-a7abf2f48669fafe7324bf0ad19bd0d9c88d0ce1.tar.xz |
mac80211: remove warning in ieee80211_get_sband()
[ Upstream commit 0ee4d55534f82a0624701d0bb9fc2304d4529086 ]
Syzbot reports that it's possible to hit this from userspace,
by trying to add a station before any other connection setup
has been done. Instead of trying to catch this in some other
way simply remove the warning, that will appropriately reject
the call from userspace.
Reported-by: syzbot+7716dbc401d9a437890d@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20210517164715.f537da276d17.Id05f40ec8761d6a8cc2df87f1aa09c651988a586@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 790c771e8108..0d4f7258b243 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1393,7 +1393,7 @@ ieee80211_get_sband(struct ieee80211_sub_if_data *sdata) rcu_read_lock(); chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); - if (WARN_ON_ONCE(!chanctx_conf)) { + if (!chanctx_conf) { rcu_read_unlock(); return NULL; } |