Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3875091ybv; Sun, 16 Feb 2020 07:54:45 -0800 (PST) X-Google-Smtp-Source: APXvYqyG22hJPa2f9GDEMGKBfjxtjpArRUlbaQ+Q0hrVzYdS1b/HwBrsbqZZSg25vQ40HcQgRGEc X-Received: by 2002:aca:c0c5:: with SMTP id q188mr7264180oif.169.1581868485564; Sun, 16 Feb 2020 07:54:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581868485; cv=none; d=google.com; s=arc-20160816; b=fxj8ALGevizlkh+kEdruyfxgxM9QFmeqOk3iwJOeGK5jKnO3B1NNvlIz1GRadR20BQ Y9QZOrMPi+/g47E1pOXhUIf53Z3RBBPZKMWCfSPayqPVmbW0X42miLPclG3ctgNl5qap 6ArhCkQ7dHHHX9k2ok5BPoJb7nMB2uFz4P34iqQb35rUqlXnQPhMtV6npowIaaUzXyVu C2DDd3s3b0wxUPpO33RnZ7+CjyTHeR2vIXsoIOUmZ+6O3hq7En8w2ASElN9+b8nXbFUi F25LYGLoyyB/7bueCz64ld+nuHrrJDAvyeuiVz6hsEoxZ/1l4o2a1OKIMGmCVH96tQUx j/uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=iPFMbfU6diExASqyRYQaLYTU+lXefr7fxHQr7uWuD1Y=; b=x69RMe1sU+AmWYYvDfcMpXd6/JsJ3mT7sCGGknw4ncOMY3d/vD5j/zq3O+JQAmPFLd BuITkAmC9ae1Svp8cvteq4pr8BaCazfNWLaqjE43ComeTAuT98n4kCgs96c2AbS99Xux 88ubAdZ89YJ3CGNqLxomFJzp84p3rk5kM3/1xcw5VmUfOsnVfq4wHt749laK0gQEAIJI 5uV9vh2MGbZ5ACWfbw9NyCoBNnhbUwxp0M1GUAIGzUfg3tX8fZNEIrPBVlObAHisGVxG kCmMwZHfIOgzgYI0efgRnSXzkdC5y2550x40p0lmr8bgzsALcfsL07oft0fOZGeOAvvw JEXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="dFOD3H1/"; 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 e22si5974834oiy.124.2020.02.16.07.54.33; Sun, 16 Feb 2020 07:54:45 -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="dFOD3H1/"; 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 S1728426AbgBPPww (ORCPT + 99 others); Sun, 16 Feb 2020 10:52:52 -0500 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46012 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728382AbgBPPwv (ORCPT ); Sun, 16 Feb 2020 10:52:51 -0500 Received: by mail-pg1-f195.google.com with SMTP id b9so7584812pgk.12; Sun, 16 Feb 2020 07:52:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=iPFMbfU6diExASqyRYQaLYTU+lXefr7fxHQr7uWuD1Y=; b=dFOD3H1/B31VEchMzaUoJ9SUKJtUO6Ioafl/z7DDVOwR6NtDtBMs/13RMPQQzMJ18Y c5C04QkzccXncDGICuf/5t/aIGwm7HczFeWtMY+Jo3fy/YcQCQRsbKRTbmcFsW15LoeS 5M5xHHjjHalh62RK5nUwazqACK6SczFYM1kEOfjlJRCmKpAnWL3N2Dep6gnyRcSdCy0j drXeDHCcx1PHXAG2jqXie+iYrkyxLoed7F+tWrFY6O9hhTv2nZuJnslWCSQRk5+QSpNy sE6STD6lqxoHPqpbLU3HpctlWUYllldWX66W6Xuc8lCiNKK33NnaGyAvPFFaJicEiWcX AudQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=iPFMbfU6diExASqyRYQaLYTU+lXefr7fxHQr7uWuD1Y=; b=Ce5Uvke37UAa8RpF2SW3BtSKhcv7DautnH5GjasaD7SQArf0wyJ2IGjeL54vqs5iJd Vd+DB2MtxuXHk1GnNYhDHquVe4ufSoS37hNnJjt9ysz+tnJ4/NZoAdF1vejy00Ofyifu hjXMUn/8jcfVJg+qlQGd8jNZBbMSia+GPFFPmd4nPt2N91xlFMH8kIwkGo6x+NoOrLBj yK6+rv8027dfrgp1eoMJgnyakfzsBWBTlt+850pRdPLedPoJV3rURFDr3VSNi274aOc+ cRjDORUAft+oFsm8Z4RKyz1xllj6xaZZLTHurJsuu/HHrHBLs3W087A+BNWLzpbwcmXy eJ3w== X-Gm-Message-State: APjAAAUlIwzSKLBYn1VZq8gDS7zo54V2MrJ60P4ySu5MByEr0vXcNT8W GOte4ERV7OC/cIh7FZ0cR1ooYac= X-Received: by 2002:aa7:961b:: with SMTP id q27mr12847463pfg.23.1581868370704; Sun, 16 Feb 2020 07:52:50 -0800 (PST) Received: from madhuparna-HP-Notebook ([2402:3a80:d03:50cf:14b2:4950:fe83:57e]) by smtp.gmail.com with ESMTPSA id c1sm13631769pfa.51.2020.02.16.07.52.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Feb 2020 07:52:50 -0800 (PST) From: Madhuparna Bhowmik X-Google-Original-From: Madhuparna Bhowmik Date: Sun, 16 Feb 2020 21:22:44 +0530 To: Sven Eckelmann Cc: Madhuparna Bhowmik , mareklindner@neomailbox.ch, sw@simonwunderlich.de, a@unstable.cc, davem@davemloft.net, b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, joel@joelfernandes.org, frextrite@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCH] net: batman-adv: Use built-in RCU list checking Message-ID: <20200216155243.GB4542@madhuparna-HP-Notebook> References: <20200216144718.2841-1-madhuparnabhowmik10@gmail.com> <3655191.udZcvKk8tv@sven-edge> <20200216153324.GA4542@madhuparna-HP-Notebook> <1634394.jP7ydfi60B@sven-edge> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1634394.jP7ydfi60B@sven-edge> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 16, 2020 at 04:35:54PM +0100, Sven Eckelmann wrote: > On Sunday, 16 February 2020 16:33:24 CET Madhuparna Bhowmik wrote: > [...] > > > Can you tell us how you've identified these four hlist_for_each_entry_rcu? > > > > The other hlist_for_each_entry_rcu() are used under the protection of > > rcu_read_lock(). We only need to pass the cond when > > hlist_for_each_entry_rcu() is used under a > > different lock (not under rcu_red_lock()) because according to the current scheme a lockdep splat > > is generated when hlist_for_each_entry_rcu() is used outside of > > rcu_read_lock() or the lockdep condition (the cond argument) evaluates > > to false. So, we need to pass this cond when it is used under the > > protection of spinlock or mutex etc. and not required if rcu_read_lock() > > is used. > > I understand this part. I was asking how you've identified them. Did you use > any tool for that? coccinelle, sparse, ... > Hi, Not really, I did it manually by inspecting each occurence. Thank you, Madhuparna > Kind regards, > Sven