From patchwork Fri May 10 07:01:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yibo Zhao X-Patchwork-Id: 10938275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EBE0F912 for ; Fri, 10 May 2019 07:02:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB92C28BE0 for ; Fri, 10 May 2019 07:02:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFA1E28BE2; Fri, 10 May 2019 07:02:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 83D4328BE0 for ; Fri, 10 May 2019 07:02:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=1/32pXa9kQzDWiXgzymSHfSxZdvlb1Z3RQ64vqd/wNw=; b=Cqk J6xSN7cgzcDbc5+IUo6C/2qlv4ImYpNmvieMZ1LBasvYjYrnkE8Vqw1ohD2AynyZtUNsRlaLaMMVr 96rrWi5Wnv+vvW10Fqi+VOSgROTSUXq6kgi1F4R8Mc5dn8WhhJC1gVdaQ/DvrkxrGNkrc8cACxKUL 9WXBJS4L7UzgxIKasj3+nTwqDzYmS4ixAWAK/ipjdbZf1lNjrKXDaFrJ99HFvpRiSOKQXHnuVUZPZ iNJAVfwTVrfSq7SgaEyFVujGhvHb34Ay4XkzPmW3fMJ/WsVcoyrJcbiOFgb2rfqB5E/4Gr3or7NnU m1yVwTZmEiqu8fYreukCBgINRfgj0hQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOzXi-0006N9-6Z; Fri, 10 May 2019 07:02:06 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOzXe-0006MU-OT for ath10k@lists.infradead.org; Fri, 10 May 2019 07:02:04 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C5EB960744; Fri, 10 May 2019 07:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557471721; bh=jOTxeffynwtDEKNRNC1OxZc+a8+J8mZ7VRSufbn91VU=; h=From:To:Cc:Subject:Date:From; b=bArGWL9nJ66fYJj7+WZZ3ygFZH0RM7D4Z7nht3etTIzG/CiAZ4pQonmD/cm+Hdf7E dLC8hd68qQXZ4xvLVQHN1+G8SCpBSA+6+NimHoDr90TFnWbjtVxQmVOPuitKptC4R7 maq0EB1zXdUP3zOHtqVjVGRJxy3rLFnbVL611j7o= Received: from ybzhao-Latitude-E5440.ap.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: yiboz@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 00A8F6076C; Fri, 10 May 2019 07:01:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1557471721; bh=jOTxeffynwtDEKNRNC1OxZc+a8+J8mZ7VRSufbn91VU=; h=From:To:Cc:Subject:Date:From; b=bArGWL9nJ66fYJj7+WZZ3ygFZH0RM7D4Z7nht3etTIzG/CiAZ4pQonmD/cm+Hdf7E dLC8hd68qQXZ4xvLVQHN1+G8SCpBSA+6+NimHoDr90TFnWbjtVxQmVOPuitKptC4R7 maq0EB1zXdUP3zOHtqVjVGRJxy3rLFnbVL611j7o= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 00A8F6076C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=yiboz@codeaurora.org From: Yibo Zhao To: linux-wireless@vger.kernel.org Subject: [PATCH] mac80211: remove warning message Date: Fri, 10 May 2019 15:01:02 +0800 Message-Id: <1557471662-1355-1-git-send-email-yiboz@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190510_000202_821912_D877C4C2 X-CRM114-Status: GOOD ( 11.77 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhi Chen , Yibo Zhao , ath10k@lists.infradead.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In multiple SSID cases, it takes time to prepare every AP interface to be ready in initializing phase. If a sta already knows everything it needs to join one of the APs and sends authentication to the AP which is not fully prepared at this point of time, AP's channel context could be NULL. As a result, warning message occurs. Even worse, if the AP is under attack via tools such as MDK3 and massive authentication requests are received in a very short time, console will be hung due to kernel warning messages. If this case can be hit during normal functionality, there should be no WARN_ON(). Those should be reserved to cases that are not supposed to be hit at all or some other more specific cases like indicating obsolete interface. Signed-off-by: Zhi Chen Signed-off-by: Yibo Zhao --- 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 2ae0364..f39c289 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1435,7 +1435,7 @@ struct ieee80211_local { 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; }