Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp832423ybi; Fri, 12 Jul 2019 05:23:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxf3KV2hj38WhwyNmf3dRuHE1m7hixG7lBfFY9SjZC9/VP1b1TVzQ9qs/qobsODuxg5o1HA X-Received: by 2002:a17:902:6b86:: with SMTP id p6mr11478017plk.14.1562934236236; Fri, 12 Jul 2019 05:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934236; cv=none; d=google.com; s=arc-20160816; b=L1gwepZGAoOk5hKKvnTi54nk5y/CZ6IHfiwsYRpspsOs14/ujO8t6Os+BMaShUDeWX GdUt+sNnx+KK/3Flq6P4NVW63v5fqEG/gbi0yCwLPeXtucGbFelM/vOpmHlF4bqf34x4 QkGsmxQ4zcGdDn0KcIbJ5OStK0ef0QIKcGci+BT+a8VJT3J7i4tisFH6OdUBbkDP/ReB Xlg3Hhkc+eG27iBhIeR16kWDJ1gzgi6qPMdvqYzdpzFlrB26HqejE2Q4h9nzNELXnMvT CMny4kbmEnzJ3X3H3OA7Uz1Xhjfxbd5C9gGMw/kUTPkInFdwv6+qaS3z7Yeax/XX1uN8 XQ1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=amxW0pL8smgCl8s3gVYkI1wdAirAfqfgV/MlgQp9RBs=; b=0zj9rDmx48p2nK8pld7SjfOcEtZUJ5lhtecL6Tvh++vIYjYigYbwqu6evDSoh6vtuu ZJCRVPBS5qY2rFNolrjydRXP8S/4U91MnRsu5Gp5nFS7vraflVaD+SAc+cWVomhvoj/a azP5BdstHE3tNEp+l9OjDI2GfODZ8a7Ag9sA2yGHxoQaXkr4HMpcGTOPo5Ca82ZoZgk4 RxsoF7Hk/4540eh4fwlam0iGqW5Pdp2Vnf2z5ogzQ2VNbeQVJNnrfMj05GnjhPXiqNFK ZnsHaKBx/0MDO98ZcQFvM4UJQnFcqJIfcRpFHR1QmZl8PIep03MkWCpfMSvzDOI6jMw5 ei5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DjJji5KE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 142si8577343pgf.35.2019.07.12.05.23.41; Fri, 12 Jul 2019 05:23:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DjJji5KE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727395AbfGLMW3 (ORCPT + 99 others); Fri, 12 Jul 2019 08:22:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:55232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbfGLMVO (ORCPT ); Fri, 12 Jul 2019 08:21:14 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6455020863; Fri, 12 Jul 2019 12:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934073; bh=3TZaRiTzG36r8NuHyChH7usWqs7WCDmM6HmwwYcGreI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DjJji5KEsSD3a/JSZg2QvNh+pPP47JmiLFISTjEk3pFcjE4bK5qgllYfLo6grQ3W5 x5Ey+AQGzxvxJaKUuqXr5y12rotEu8A2OmyDFYHBI7g93B1rtp/HPdpbIB6qhiJuzk t/HNBG/n9jo03VfxeBqBLbNrjVb7XL7w6mXyEgEE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhi Chen , Yibo Zhao , Johannes Berg , Sasha Levin Subject: [PATCH 4.19 36/91] mac80211: only warn once on chanctx_conf being NULL Date: Fri, 12 Jul 2019 14:18:39 +0200 Message-Id: <20190712121623.340604828@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121621.422224300@linuxfoundation.org> References: <20190712121621.422224300@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 563572340173865a9a356e6bb02579e6998a876d ] 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. WARN_ON_ONCE() could be a better way for indicating warning messages without duplicate messages to flood the console. Johannes: We still need to address the underlying problem, but we don't really have a good handle on it yet. Suppress the worst side-effects for now. Signed-off-by: Zhi Chen Signed-off-by: Yibo Zhao [johannes: add note, change subject] Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- 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 35c6dfa13fa8..24f5ced630f5 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1410,7 +1410,7 @@ ieee80211_get_sband(struct ieee80211_sub_if_data *sdata) rcu_read_lock(); chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); - if (WARN_ON(!chanctx_conf)) { + if (WARN_ON_ONCE(!chanctx_conf)) { rcu_read_unlock(); return NULL; } -- 2.20.1