Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6331626ybv; Tue, 18 Feb 2020 14:50:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzRZK7Y5ERTo6FEF/p3QI6YhIN9k1cT2gADgWhIxFUF73CLM1Jos2PmM5h22SghZD088pT0 X-Received: by 2002:a05:6830:11:: with SMTP id c17mr17225745otp.360.1582066200168; Tue, 18 Feb 2020 14:50:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582066200; cv=none; d=google.com; s=arc-20160816; b=nCaoYRILglzjsTADkAWJd9SCePFbVvtheGSBAW7aOopl1U4BOF4g03LY3g1nzzWoIt +taxwTxt9D270votZbEYS8Px15YbKMHjKyLafPHLfIlKRHq4/pESDoe56157PhvM7QN6 vF41aSVbcM9MZmugGj8BFQPRK9XRmWRul+vucGhjZvfyDYq99pV5GNHvmmX0s3oUtGz1 6gLUgJBftUs6+U6w+6Yjh0DiFgUP/mx1QZT6EJu3Jv/rQx++khbmRxUVCR/mUXLef1Uf x2qwSz/evf0vEF51p9lfE8M7nc+44CcYAnwAPp1l1JVQKhzbYMUsyM6ugPl2DfJEcyVG nHIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=l6bGLfW+S3PbTSNe7BlkqXOXTsrm4VZ4lQdamKUPW64=; b=BRFpomjG5dANfbl73dRkx6i1UkUC9In4ZSACniq9ZE1cQJI1LaDEoaPxJy4jWoErZS psfHNbNGpE+0qC67Bn2yeRSrokw4v89hjyOZTpXXxeYyqTZ3ulN9qc8yT11YuRuoDFPj 6/omz0rXOyzMYHe3bbXtHZ83eGemPp96xrh629XAPPCy6TycdZfFQIl1SC1YGK8BMyrU Flk9X/cmz50Dt6Yw/htkJJfp2aLO+UguPLG9sslhQh+60VKdZhn1zFyyaiLmQDp6yCwO 5//THIsJxVc3NCUuOHpXBRM9bMZHAWfJxLA7uCnFzSED2ejI1NFkDV9VuKVrGB2XJpDR v5Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=Ih8OVG9o; 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 h17si987895oib.234.2020.02.18.14.49.47; Tue, 18 Feb 2020 14:50: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; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=Ih8OVG9o; 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 S1726891AbgBRWtK (ORCPT + 99 others); Tue, 18 Feb 2020 17:49:10 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:43890 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726556AbgBRWtK (ORCPT ); Tue, 18 Feb 2020 17:49:10 -0500 Received: by mail-ed1-f66.google.com with SMTP id dc19so26696499edb.10 for ; Tue, 18 Feb 2020 14:49:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=l6bGLfW+S3PbTSNe7BlkqXOXTsrm4VZ4lQdamKUPW64=; b=Ih8OVG9omwJ6Rxw+SlKjwczxNf0k2Ng94CvXCZbV3YDaX3UQbLCeVFJCDBgE+/TbWa 949c1MNdpMLpcyDXtROzVlkZqcqThZvj3dhD1ALAKRu2iuAubkhK1t55o+Mi/JGULJQA Do0mKi+fIwpeSajmK6ZtYgsGWtcp2ixmaSSIN7Z+3VM59asG03lUut8OZYU+OftobKN/ FARxahH/c9osR5/SjqCdrfiIcl3zufcnKdJwz8aagy+PHbiKJZq82UM0DiByhRA429++ amw4egh1MaKmoNsfmmEllJZPFRXMrhRAJ3PBPBSRTfXKHz76UknYvpsHjXKYCfr9H+iG sLNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=l6bGLfW+S3PbTSNe7BlkqXOXTsrm4VZ4lQdamKUPW64=; b=sAH72xVubfAM7RJ5Wi+VDPnTuuIjN0Pw30DAOu2fDU3HUb/fHOBrGwp42xwMb0Ek0h 4jzOsL7r6aQGw9QVYKrMmG4P6slOBoOYNHVvnBlDjpvIks6Bdud9QaGeEY5J57sAmPLM HRxJbtvD0RQmZQQi8MALljK/fQCjM3vtHit3L7s3kJSrfTvu/f0vccqmoGXl+Eq88i8B nSAI/gBtM09Tdz9U+HmtzJtj1eYrrCTQ9ItLhan1tV4dNdTGAwsnUlqe8e29wJW+7Ug/ H9zVbDzb8MRnVnX75SZYjhVnP1vgoes4mudPqGsSDQPivNWoLmBLAaFvTKWgiAwo0Xtj FZCw== X-Gm-Message-State: APjAAAXu399YH7cIpCinVNImsbTVovBiMCyZ6D+4lU4HmbiIJoxzYCgD bH33H1Ha1JIYkUourvf3ByvIgLbkHkqhXd4snHFVwty7dA== X-Received: by 2002:a17:906:f251:: with SMTP id gy17mr21225090ejb.308.1582066147205; Tue, 18 Feb 2020 14:49:07 -0800 (PST) MIME-Version: 1.0 References: <20200218181718.7258-1-madhuparnabhowmik10@gmail.com> In-Reply-To: <20200218181718.7258-1-madhuparnabhowmik10@gmail.com> From: Paul Moore Date: Tue, 18 Feb 2020 17:48:56 -0500 Message-ID: Subject: Re: [PATCH] net: netlabel: Use built-in RCU list checking To: madhuparnabhowmik10@gmail.com Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, joel@joelfernandes.org, frextrite@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, paulmck@kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 1:17 PM 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. > > Signed-off-by: Madhuparna Bhowmik > --- > net/netlabel/netlabel_unlabeled.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Not that this has much bearing since it's already been merged, but for what it's worth ... Acked-by: Paul Moore > diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c > index d2e4ab8d1cb1..77bb1bb22c3b 100644 > --- a/net/netlabel/netlabel_unlabeled.c > +++ b/net/netlabel/netlabel_unlabeled.c > @@ -207,7 +207,8 @@ static struct netlbl_unlhsh_iface *netlbl_unlhsh_search_iface(int ifindex) > > bkt = netlbl_unlhsh_hash(ifindex); > bkt_list = &netlbl_unlhsh_rcu_deref(netlbl_unlhsh)->tbl[bkt]; > - list_for_each_entry_rcu(iter, bkt_list, list) > + list_for_each_entry_rcu(iter, bkt_list, list, > + lockdep_is_held(&netlbl_unlhsh_lock)) > if (iter->valid && iter->ifindex == ifindex) > return iter; > > -- > 2.17.1 -- paul moore www.paul-moore.com