Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp993181ybv; Wed, 19 Feb 2020 13:35:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyPW232Myzs4CP7JPQooODbJZHbEdIPW+I+UFQWbJ2LJ0dukV9B9p+/zaZf+voKuTkQqjGE X-Received: by 2002:aca:53c6:: with SMTP id h189mr6041086oib.11.1582148108768; Wed, 19 Feb 2020 13:35:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582148108; cv=none; d=google.com; s=arc-20160816; b=kLm6rLi45CKhuDVUam30UKrtkWDHtCXyyGGZGMlkKnIg5PBZP0kBf0wnr128+vtcyX 4/SShWDEeAYXPcZ9dQXkn2w91xqpFv024HcTdiTBtU2V6W/MY/KhxqWC5KoSYMUNu642 QSX/RPnLbKNKZOJLyIaLbzfBYbh3V9VNX09uGHGvIWOStpSmgbRi42zbucbIpuo+/Fbp H0Tec4WNG3G7NEqtCMVB5DzMopBT3G+y1USyWA3+xwnjzz/PscM/BQmcf6L2dhznqrQN 7ernbXHDcIoLOGTpfa8WUyBBjT+jxmsjQvdUTwpHrmakhqU5WsnPvFun6CjHY+k0OaAl /FTw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=yDc3+2LTXdeT4DFS6yiHXemjisG4SKrPsn7wcWKNyc0=; b=mlIO2vBiqCsF159o9RReBw3hI2EixpoLfkLA7uxo19paI5fqwEuzBmq65LMIDsfhHO 7vhKs//+J8y0dza6yo/hcoOH1DbXc9liu0UuADZdwlAJfaNK5W7VdkojZQC+KCLtN11I uJXYU+F3dMQ/YPwMzwZt/zoH22jBoU8eXRSYiEqBm0NviamkQRd4SLkXmcTDmREOXnb6 xMXetUefj5qcbb9UKoer8ezasF7+y64YefHJfh8TvXY9H5kpDetWIx1u2YRoeT36w1QM 8uqs+0kOyUOuUYtb2mUIcreZN2RCi0yu6VqSs411XGKog4p1JjZZojmMHq7ogZtLAom3 Os+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=cYcZaClt; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15si9279969oih.41.2020.02.19.13.34.56; Wed, 19 Feb 2020 13:35:08 -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=@broadcom.com header.s=google header.b=cYcZaClt; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727636AbgBSVdc (ORCPT + 99 others); Wed, 19 Feb 2020 16:33:32 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46153 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727775AbgBSVdb (ORCPT ); Wed, 19 Feb 2020 16:33:31 -0500 Received: by mail-wr1-f68.google.com with SMTP id z7so2227883wrl.13 for ; Wed, 19 Feb 2020 13:33:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yDc3+2LTXdeT4DFS6yiHXemjisG4SKrPsn7wcWKNyc0=; b=cYcZaCltkuSpbD/WoHJZ+CIv9gG+julOvJ1jka7rOBCY5GMl9cks8jtPmd4v6WArov 1mHzdIUClTgGLHl2fqzIiUqoBc8skRZLZ8VCXOzUhSxYUtPRmmsLAY/U0BJ56qUcmUmH RCcTREkweJYOkTucwK/nzuiNGNow0+L6tS9qQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yDc3+2LTXdeT4DFS6yiHXemjisG4SKrPsn7wcWKNyc0=; b=XtXszZBJMzxkq0BKPcHsqvZBMwROCTr2Yk10lDwG2/qslQNJUs33LX4LCfDvus9U7b grVKJzGxyRTNmT6+E5xt2ApmP903n0Ez+McCW0BnjYK1AxDcqow7UM5nSyksTEzrPBR2 DeXkvQGIq8SFg44018Kz4f/scXEFhTMg6t5kyzOHW7QGsYJ3UnyK40k/lrYr4+zdtl+4 TNT7c0ivt6E2IN5Z8dBCoOqmu6vaW1cYnhZYYdo+edT1Z8zU6U/un/f8c9CdSXA5wHL/ HnDxH3Wh9g5AkREEANtUscL4GcMUvYwfEAUVOusVsR0W0ZbEQ7FzrHeVl4ptlFpXEglR QQNg== X-Gm-Message-State: APjAAAUOYK0dGKjM5Fpiy2z7ny7+f8tp5971wnxESYN2rtMyztbx7ER4 3EGAgU+RHeE3d7nv2IdcMmQwjg== X-Received: by 2002:adf:90e1:: with SMTP id i88mr39007634wri.95.1582148009688; Wed, 19 Feb 2020 13:33:29 -0800 (PST) Received: from [192.168.178.129] (f140230.upc-f.chello.nl. [80.56.140.230]) by smtp.gmail.com with ESMTPSA id h13sm1626791wrw.54.2020.02.19.13.33.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Feb 2020 13:33:29 -0800 (PST) Subject: Re: [PATCH] cfg80211: Pass lockdep expression to RCU lists To: Johannes Berg , Amol Grover , "David S . Miller" , Jakub Kicinski Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Joel Fernandes , Madhuparna Bhowmik , "Paul E . McKenney" References: <20200219091102.10709-1-frextrite@gmail.com> <407d6295-6990-4ef6-7d36-e08a942607c8@broadcom.com> <855dec1f598d8b43400089cd0c5a7ac9b3533fc7.camel@sipsolutions.net> From: Arend Van Spriel Message-ID: <795b0dd6-23e7-8780-7cde-cf309f08109f@broadcom.com> Date: Wed, 19 Feb 2020 22:33:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <855dec1f598d8b43400089cd0c5a7ac9b3533fc7.camel@sipsolutions.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/19/2020 10:29 PM, Johannes Berg wrote: > On Wed, 2020-02-19 at 22:27 +0100, Arend Van Spriel wrote: >> On 2/19/2020 10:13 AM, Johannes Berg wrote: >>> On Wed, 2020-02-19 at 14:41 +0530, Amol Grover wrote: >>>> >>>> - WARN_ON_ONCE(!rcu_read_lock_held() && !lockdep_rtnl_is_held()); >>>> - >>>> - list_for_each_entry_rcu(pos, &rdev->sched_scan_req_list, list) { >>>> + list_for_each_entry_rcu(pos, &rdev->sched_scan_req_list, list, >>>> + lockdep_rtnl_is_held()) { >>> >>> Huh, I didn't even know you _could_ do that :) >> >> Me neither ;-). Above you are removing the WARN_ON_ONCE() entirely. >> Would it not be good to keep the WARN_ON_ONCE() with only the >> !rcu_read_lock_held() check. > > Not needed, the macro expansion will already contain > rcu_read_lock_any_held() just like in all the other cases where you pass > a lockdep condition to RCU helpers. Ah, yes. I see it in __list_check_rcu(). Thanks, Arend