Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp213816ybv; Sat, 22 Feb 2020 02:23:54 -0800 (PST) X-Google-Smtp-Source: APXvYqw57Q2mq5QBzCw7d0swHrVIoPWooporFGPvclTBYFARn+4NDPISURpjeSjajRxdACHcPZKR X-Received: by 2002:a9d:6301:: with SMTP id q1mr31328616otk.299.1582367034027; Sat, 22 Feb 2020 02:23:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582367034; cv=none; d=google.com; s=arc-20160816; b=T79nqwMpheGr2RcI1O1nnVPeZT7x3eeSuaJIbSsPCLJdXPzl4IxCFlrhHHaVV3L2/p bUDiQUKletyeMWui+3XqLy6TLVQNGG8VovPIsJ38xaYiDLsn2xC5pDlqQp5C1vlOQStA 8Xnt4pkSv2W8Sj+I3v7hv5xHV4AIelnmtbupjwKc6hNGXrrF59b3hWdpk4pC65KsHE14 Lsgh72F64GgyXQQWdBOqrtTOCrGjYwe8bXDqdmGmON/hCMCrocVMWg3jGh3FFDQUIKQR 4/Sn7gUQG5OJaqvKNDPd3gn1VCU4CL3qQsl6ZFPb7ClOH/XhqU6st7d+Yx+pIaivlei+ szNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=EvDiT7bfIhipTWPuk+o95uS98pfW7H0yCdQ9Sfbo/Ig=; b=Ojg3MZpu6+bO7pckYPTsqQVZ18l8Zr/2KnZVmndLuB8t2MnV5ENU4mgA5F+WqP9rrN qYSTrRGD5AJVBHV+5a3DWZlQL2AC5o+kb3LLC51nIMG701CJTAuxhW4ATAWpd0Enh/rr Ket9WZ40HGKdCQO7+5zb03XsDiYzd//GQWJUKxQAeMce0tfXrqt3SZ98/Mdz/LHcEazj KYyFtvDOIX+Sc0RZbavLr5Rrl3b6gdMZ23p65elVvQTuIaX0exMP3+MUodQc8CzdnLqW /JaO4M1u4cN4wpuPOkjmQ2RfsCtGq86aQ46I0DI+CLUd/RS4b9VUmEjgAUPAHTS4w+H5 Uk+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="E1/3ABOe"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si3144796otk.227.2020.02.22.02.23.27; Sat, 22 Feb 2020 02:23:54 -0800 (PST) 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=@gmail.com header.s=20161025 header.b="E1/3ABOe"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727124AbgBVKVi (ORCPT + 99 others); Sat, 22 Feb 2020 05:21:38 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:44537 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbgBVKVi (ORCPT ); Sat, 22 Feb 2020 05:21:38 -0500 Received: by mail-pf1-f196.google.com with SMTP id y5so2636994pfb.11; Sat, 22 Feb 2020 02:21:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=EvDiT7bfIhipTWPuk+o95uS98pfW7H0yCdQ9Sfbo/Ig=; b=E1/3ABOeJQH0wnuX05IolVmIzSvEmtPAQMAKISZRE2fJdP4fBRe0LzXpHBx0nbm2Yg lbQgRPmdPW2NVHfTSiMcq2H1nq9eZJCEm3LI6QpEmGESMe7eryC9V6t5CQEe+2qUExb6 t4+djDOoQcjMF7AnYmD1vYKdIqS61aN0vSirk9KlUFq6vWvGAOX11edipD39TDR57tv9 itNEOpo9JNzTejTF9m0WNGX3It/h0umtzpGcidkTTyq63GBC1N2cQgdl8QuAv+zpr2mn 45ZsKYRnx9mGvpeqUnb2vIRZfhfLM5cw5ncI4t21CVsOvUgiUPMtLgTJM4yvANTIoKoo Dksw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EvDiT7bfIhipTWPuk+o95uS98pfW7H0yCdQ9Sfbo/Ig=; b=KlTOl63PT+uwcAugbpn1D4VK65/OLIj5vH6oviUT+U6fLSIfbPXljaV+FJSKjgDc7j vsV0UY29hjx7I4NVO2uqe2MhrrMOojbPNbgNokiGaju/MZIdBbSgQErYp1Q6R9EHz4hI f9KhwQst1Onrez6Et74zbDLFVGwjH5PEOJ0NYbgGvgDflyBK3ceOXy5pDtpXwqz2mXcS mGoBo8MRMn1wkl8DUQ07mpRlMfHkZAr6tTwR+Mygm4GAq4/L2Ul/4CxDZNs/hnsemgxq QbxQAbGzSnd9YcJ/dQwtxZdwPlnqyRjjvQpM2S/gbsM2D5dYqnnvObVxqlYEWDQxXfcu HU0Q== X-Gm-Message-State: APjAAAVGU4KtZBlEmdqNtqAcd2PsbvfXIz0bP44mLEGJMRUG+j+3SVTg CNOqJp5nZeF0FHQ97Ci2eg== X-Received: by 2002:a63:d003:: with SMTP id z3mr41300183pgf.448.1582366897473; Sat, 22 Feb 2020 02:21:37 -0800 (PST) Received: from madhuparna-HP-Notebook.nitk.ac.in ([112.79.49.48]) by smtp.gmail.com with ESMTPSA id w6sm6237352pfq.99.2020.02.22.02.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Feb 2020 02:21:36 -0800 (PST) From: madhuparnabhowmik10@gmail.com To: johannes@sipsolutions.net, davem@davemloft.net Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, joel@joelfernandes.org, frextrite@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, paulmck@kernel.org, Madhuparna Bhowmik Subject: [PATCH] net: mac80211: rx.c: Use built-in RCU list checking Date: Sat, 22 Feb 2020 15:48:31 +0530 Message-Id: <20200222101831.8001-1-madhuparnabhowmik10@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Madhuparna Bhowmik list_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik --- net/mac80211/rx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 0e05ff037672..0967bdc75938 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3547,7 +3547,8 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, skb->pkt_type = PACKET_OTHERHOST; skb->protocol = htons(ETH_P_802_2); - list_for_each_entry_rcu(sdata, &local->interfaces, list) { + list_for_each_entry_rcu(sdata, &local->interfaces, list, + lockdep_is_held(&rx->local->rx_path_lock)) { if (!ieee80211_sdata_running(sdata)) continue; @@ -4114,7 +4115,8 @@ void __ieee80211_check_fast_rx_iface(struct ieee80211_sub_if_data *sdata) lockdep_assert_held(&local->sta_mtx); - list_for_each_entry_rcu(sta, &local->sta_list, list) { + list_for_each_entry_rcu(sta, &local->sta_list, list, + lockdep_is_held(&local->sta_mtx)) { if (sdata != sta->sdata && (!sta->sdata->bss || sta->sdata->bss != sdata->bss)) continue; -- 2.17.1