Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp344545ybv; Sat, 22 Feb 2020 04:54:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyVfVzsXss1Gk+RhW281baXbt5f0cCbYMhLwoAf8OvycNv3vgON4wH8NdDOGqa8ItYMnppI X-Received: by 2002:aca:c243:: with SMTP id s64mr5888666oif.141.1582376040077; Sat, 22 Feb 2020 04:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582376040; cv=none; d=google.com; s=arc-20160816; b=Q085nj1Ot41pIzjBZB3tuMrsZCUDxjYlKbEMxZBnCQwnoNyitwrNZlC5EBJ+MP6JEt 7sUbkbQOo9zPX++1UNhHLU3Dmxk5uVom0E8go/3t48J2Dw2mRwhY1sd8gorunbJFlGLX /425G0QU30EBTX/2WclFtzhbiDr1xsCqbJo30P388ee/BzCSkmyYmrOWVeN7GWlLWX+A /2Vm8kjyfY5crfpfaY+DXFZOv+04uZDjtVueF7/CxEGBjBfo9dcbCIeEo9SpmZYzy005 V5YHOhq3ag9LmO0p4ZoVHxoq9zzK7MzP5A8WcC3lwJ1hN9ROhgPODY+NAcLFT7KMq77e 4GTw== 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:date:cc:to:from:subject :message-id; bh=FiDVu3aYFGEGD+cUwdC4fwNT1ieCUC5MrrWryu1vY/o=; b=YSfWE+WlDUgY4eMfJ9Pq9PgiLzpLr1t2Ojwfvl1ZqymnLr9Aecz30TOp8xOODn3asm EnRRbHqYtESpk2rJ5X4XW34L7McUCzOTenNUKjjeqJfmlOZr+X6hhd/zZBGr8qfKC2vA FEMg8uWuWSUtolZK74zG7NTXy0ReCiZnaZTp0nynWfBE859NtnHQwh9f+yjnFQ0uYMtd e3G7dLJsREH1/oRtxqs5+y312MZe1fOcf021JGGQ+18BanDi3gLYDJ6qmjehjSXQteTT bpQvllKCTKw1DyQWlr1VnWMZNw/xt7YuZRuDmlVJZaNhkfWr79t9NYHIUzI9MPw9n0Lt qAFw== ARC-Authentication-Results: i=1; mx.google.com; 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 c18si4509799ots.317.2020.02.22.04.53.46; Sat, 22 Feb 2020 04:54:00 -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; 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 S1727321AbgBVMxm (ORCPT + 99 others); Sat, 22 Feb 2020 07:53:42 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:58060 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726839AbgBVMxl (ORCPT ); Sat, 22 Feb 2020 07:53:41 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1j5UHe-000fEg-Jf; Sat, 22 Feb 2020 13:53:26 +0100 Message-ID: Subject: Re: [PATCH] net: mac80211: rx.c: Use built-in RCU list checking From: Johannes Berg To: madhuparnabhowmik10@gmail.com, 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 Date: Sat, 22 Feb 2020 13:53:25 +0100 In-Reply-To: <20200222101831.8001-1-madhuparnabhowmik10@gmail.com> (sfid-20200222_112140_052707_ACC75C29) References: <20200222101831.8001-1-madhuparnabhowmik10@gmail.com> (sfid-20200222_112140_052707_ACC75C29) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2020-02-22 at 15:48 +0530, madhuparnabhowmik10@gmail.com wrote: > 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. Umm. What warning? > +++ 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; This is not related at all. > @@ -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)) { And this isn't even a real RCU iteration, since we _must_ hold the mutex here. johannes