Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2099953ybv; Fri, 21 Feb 2020 08:53:42 -0800 (PST) X-Google-Smtp-Source: APXvYqyt8Au2lMyFxqM6ecFuHzyElLrzsyyyRx0Em4R77acMhfmRXNnrPQH9CrzB8RDtL38o4VQj X-Received: by 2002:a9d:7f8d:: with SMTP id t13mr27021439otp.175.1582304021933; Fri, 21 Feb 2020 08:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582304021; cv=none; d=google.com; s=arc-20160816; b=ab2ccIaBW/PnKY2vL8QkBdYBPysUgMS8+AyRv7BPG8AUvwGFWE0TUrPf05jLxHCBng Nym2i4PdtUDvF9F+JMMY+lyQ7EAVttguJVCpiydOxBLVH6SFmqsNGImaF4hGyxe2pS/N A5DWCE3h3cxP9B2MrVTxDFfGYqeo/2FYeE2aoB4LhziR6KEo/7+kH1G2fKnT72jIV0Yh a47q94Z7v8xrKsN3qmMQhfg1jZBlT0hDXy73Tzf6CREOA85Q3cbIf/4oEk/ufxFluWTn x/orn7eSDhzyAPCD3JKjtG7Ur+5H0YaRDe2u3IXH+X0b9QuiKZh/t4oHLOaB2ZLzImo5 PTAw== 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=2hY9rIiih8tmdugozlZsp7q9G6E5pP7+c2/8u13UX8A=; b=qxSPP8KugwDoivmp8fXQ4gZQ6voE1ors7gXJp/IhfMlJQQ9mjrq70GhG5exeqy3Y6F Q9PNB6BxJMSn8WUIw1Z9LqL/Yxebgo4QzrwzgKkWm4BcLpHWR+OE0Av8bYC4BOn0366l nEo7Y3iGMa9Qk083Op+9RK3p4J+8FeOPf3hPxN9p67nY/Iic2JMMydJVRsbe/HRJo8a9 /qxZTbDRPTb8vnJ30uwJLqQhAfoNDa/lRXq9J55DTyBFQHKAqTrHQlUiZw8UFUCj8FCl eoR6WVkrFIFvQraC4Bf8diwW8VfeoEoDFmI3mJR2CVJNgz6c2juGTTPyEneXYWM8JwUv My8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LQEmUwEr; 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 l198si1036953oig.120.2020.02.21.08.53.29; Fri, 21 Feb 2020 08:53:41 -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=LQEmUwEr; 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 S1727291AbgBUQxK (ORCPT + 99 others); Fri, 21 Feb 2020 11:53:10 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:44229 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726408AbgBUQxJ (ORCPT ); Fri, 21 Feb 2020 11:53:09 -0500 Received: by mail-pf1-f195.google.com with SMTP id y5so1506579pfb.11; Fri, 21 Feb 2020 08:53:09 -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=2hY9rIiih8tmdugozlZsp7q9G6E5pP7+c2/8u13UX8A=; b=LQEmUwErip2nQCUkW0HJOVtYZuDA/PNx8tbnf+qcUjlmDRz4It46DzTFWcf2S4EGIE /s6JUGUihBgs1Lma2v/xZ6eeVNL1+cSzGsqtNINMYWc7Mxj21e9B4kcZA+hwCl6J5CEk MKsmP1qR4BVUS5kAA+5YlTbIQsWLGzwH6rLx6DvfNAhiR+v16g3Fp/e6Cfi2LI03fy0/ OoqPMUwUwKPwlG/qU4zq64qbPkydQ0vzuXEPuQTr1d8B8m66k+GGZaY+0rbMo2Q0iRD7 mJ0C4lIScO2lcxg9gC7Q3kx6CN9qfie17KdVk4QpsOTKxqyCPBr4YaLWAqXEsy6SXCnA sjhQ== 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=2hY9rIiih8tmdugozlZsp7q9G6E5pP7+c2/8u13UX8A=; b=HYE2Gg9xkGxFbq1hWC7iuvkn9cOCxvzspNszRzSoNzgQFl2Ud8i6gL30s3J5dLxUD0 hdbz9OJUHNaF5lj+erH7cT9hxgHtoV6GqmA+qgVhBurE86SWuLDFR10byLvCEbinvRwi jOyZtP0P36Tp8r4eAoqmTWV0J8ilYVLrXUceRMwP64rDOmZhcTMTbbU2l297c/eM5HVn mfkbWDrTCUO1Ssuh3tPGqOjGPfqgLbdc2u2Hucu0iQx8FBw1XW3wIsTF7DID/IszZYSY KZKZp0M4bmZ/j5i2bF/sIj9vXGa3vApAiNi2vLBfCgTBhE/qYKfA9A4YLGv0yO3CVRPR XmxQ== X-Gm-Message-State: APjAAAWxSfgum1qP+t6jPsDcrOOJ+f6/nQKSO46vN1P+efEss2QBweqo mLJWNtvTmyJNKLef+RCO0A== X-Received: by 2002:aa7:8bda:: with SMTP id s26mr39031993pfd.194.1582303989009; Fri, 21 Feb 2020 08:53:09 -0800 (PST) Received: from madhuparna-HP-Notebook.nitk.ac.in ([2402:3a80:1ee0:fe5e:d03d:769b:c838:c146]) by smtp.gmail.com with ESMTPSA id l13sm3150484pjq.23.2020.02.21.08.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 08:53:08 -0800 (PST) From: madhuparnabhowmik10@gmail.com To: jiri@mellanox.com, davem@davemloft.net Cc: 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: core: devlink.c: Use built-in RCU list checking Date: Fri, 21 Feb 2020 22:21:41 +0530 Message-Id: <20200221165141.24630-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/core/devlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index 4c63c9a4c09e..3e8c94155d93 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -2107,7 +2107,8 @@ devlink_dpipe_table_find(struct list_head *dpipe_tables, { struct devlink_dpipe_table *table; - list_for_each_entry_rcu(table, dpipe_tables, list) { + list_for_each_entry_rcu(table, dpipe_tables, list, + lockdep_is_held(&devlink->lock)) { if (!strcmp(table->name, table_name)) return table; } -- 2.17.1