All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>,
	syzbot+7716dbc401d9a437890d@syzkaller.appspotmail.com,
	Sasha Levin <sashal@kernel.org>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.9 01/13] mac80211: remove warning in ieee80211_get_sband()
Date: Mon, 21 Jun 2021 13:55:31 -0400	[thread overview]
Message-ID: <20210621175544.736421-1-sashal@kernel.org> (raw)

From: Johannes Berg <johannes.berg@intel.com>

[ 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>
---
 net/mac80211/ieee80211_i.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 21b35255ecc2..f5532a3ce72e 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1391,7 +1391,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;
 	}
-- 
2.30.2


             reply	other threads:[~2021-06-21 18:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 17:55 Sasha Levin [this message]
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 02/13] cfg80211: call cfg80211_leave_ocb when switching away from OCB Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 03/13] mac80211: drop multicast fragments Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 04/13] ping: Check return value of function 'ping_queue_rcv_skb' Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 05/13] inet: annotate date races around sk->sk_txhash Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 06/13] net: caif: fix memory leak in ldisc_open Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 07/13] net/packet: annotate accesses to po->bind Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 08/13] net/packet: annotate accesses to po->ifindex Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 09/13] r8152: Avoid memcpy() over-reading of ETH_SS_STATS Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 10/13] sh_eth: " Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 11/13] r8169: " Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 12/13] net: qed: Fix memcpy() overflow of qed_dcbx_params() Sasha Levin
2021-06-21 17:55 ` [PATCH AUTOSEL 4.9 13/13] net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY Sasha Levin
2021-06-21 17:55   ` Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210621175544.736421-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=johannes.berg@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+7716dbc401d9a437890d@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.