Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4415097ybi; Mon, 15 Jul 2019 08:34:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjFWd0Ow2CtvIsuRBTcyjCl09momMEpNYxurRzmiKgVht0If2pgQ9ZAMhI4yvGfWf2BeIU X-Received: by 2002:a63:2252:: with SMTP id t18mr27662299pgm.5.1563204886678; Mon, 15 Jul 2019 08:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563204886; cv=none; d=google.com; s=arc-20160816; b=PU9TGQYGwe9PwE6lERFADD/1DH55utFU9B8tdZtVeHHw1G8+4rx015bEsN48rdVOrz fEu+vuvE1Pj1yemExbm9TZNacV4j1IHLFxcRjbgncyn9Zn/J/JIxxEBEnjbMXur1hagY 3sb8mCNcnI/O4DvaFCePMvjQa/Df+UL8PwsSRIW8W9iUqsoMz/j7/C3/dG1ZCjVZxVb3 AghUUQMaR1wsI2Ill1d5yg9CLVGov7/C7Gjj2zmMhlYlg8LykUHtf7vBokE1BbM/6Lb5 LSGRML6SGafmSHV5KLutnyJc/XukVqDTpll+dpuV8Mv1/2i27VFhfnOiBgDsAu8KAeH0 avhA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/gvD5L3W4khYlR/j02/LMhetLZkkRNPQ8EPkwaYb/Yo=; b=g6mv3ZzntZ0WBm8KJ/j45vSMePO8xl0pnt04Ti8eyT2cAciTE/WBkFyGOXqiU9zVd0 KuAqOTO52DBaHgQTAwld/CFsBWdzNQCHXL2bVSk0+Zt3xucmqUb78+wMC+5VvJ9Um6Ww 0NAiHqI7KH4D6bYqzn4QTFK7xeLIK6y/zsiWsUrDbCp2h25kYQH5khf5NVfrVbwZ2Acd PJZsNkiK5dH2I053QnRws8o7731WUVcZxNqxMknKtEiJC9ZFGOve0z0YkOuc5fAsjZf7 A5EtWinpPXg0zg4dNmkaqRPzomX3VfcRqo976LIkkmw2mMozQ85gh7ChSzGym3VisPUL 7EXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=WUpb9JKs; 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 q187si17381898pfb.51.2019.07.15.08.34.30; Mon, 15 Jul 2019 08:34:46 -0700 (PDT) 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=@joelfernandes.org header.s=google header.b=WUpb9JKs; 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 S2404472AbfGOOob (ORCPT + 99 others); Mon, 15 Jul 2019 10:44:31 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:41932 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404704AbfGOOhb (ORCPT ); Mon, 15 Jul 2019 10:37:31 -0400 Received: by mail-pl1-f194.google.com with SMTP id m9so8357587pls.8 for ; Mon, 15 Jul 2019 07:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/gvD5L3W4khYlR/j02/LMhetLZkkRNPQ8EPkwaYb/Yo=; b=WUpb9JKsXzIHcxew1wAVQiWwZ+kaf0Ww3b9i/phqeK6eGSyIkMrGlEABg1JgP/N6a7 XI3TNv1vdpFEoUyT+MAAdsh6eiTQV1SZjNnbyXSh4bYq6H3Gz7K8UhzDuVF/rfbp1RTm xNeitgRKD2kv4LjyEJgK6S9GJGZvS2JWmOhuM= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/gvD5L3W4khYlR/j02/LMhetLZkkRNPQ8EPkwaYb/Yo=; b=iOO3xw78VKc3997s5WbE6ofJohH0h01SrcgX/IgDXrFxIZrvlkZVGOhH6bDSnoQ957 LsTSUd9JMte+8chXAxztyM+507j35sl0ifgahFT/9wPoa4iA4q9rSLeoCNqy7Rh3gRNh fZSYpvR2KoDWJFjEqJA0GH/QQXJc5rzur99h6VMOj7UrPX/vqnDBvgYvC4veEroP19DY DzP52okj3vz2nQGsQttzUAMzgyFZWw0iGSHHeU9HaHHvGxFyFIEoya0zCbmtMowZssck aJt6dJhvFpJq3RDGH6UXQTvyKXnDM4hHWxGi2NfpP8iuigsPRt1bFEmY+cOGlVqOxvOK BR7A== X-Gm-Message-State: APjAAAUGe+70yEZg5QjOBeJfdI6lIEdp22ome2EPMFNVt26WWajBRIPf qk8ml8O2URkPenIFM75TWDJqzIc8 X-Received: by 2002:a17:902:1003:: with SMTP id b3mr29244590pla.172.1563201450419; Mon, 15 Jul 2019 07:37:30 -0700 (PDT) Received: from joelaf.cam.corp.google.com ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id s66sm18381852pfs.8.2019.07.15.07.37.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 15 Jul 2019 07:37:29 -0700 (PDT) From: "Joel Fernandes (Google)" To: linux-kernel@vger.kernel.org Cc: "Joel Fernandes (Google)" , Alexey Kuznetsov , Bjorn Helgaas , Borislav Petkov , c0d1n61at3@gmail.com, "David S. Miller" , edumazet@google.com, Greg Kroah-Hartman , Hideaki YOSHIFUJI , "H. Peter Anvin" , Ingo Molnar , Jonathan Corbet , Josh Triplett , keescook@chromium.org, kernel-hardening@lists.openwall.com, kernel-team@android.com, Lai Jiangshan , Len Brown , linux-acpi@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, Mathieu Desnoyers , neilb@suse.com, netdev@vger.kernel.org, Oleg Nesterov , "Paul E. McKenney" , Pavel Machek , peterz@infradead.org, "Rafael J. Wysocki" , Rasmus Villemoes , rcu@vger.kernel.org, Steven Rostedt , Tejun Heo , Thomas Gleixner , will@kernel.org, x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)) Subject: [PATCH 4/9] ipv4: add lockdep condition to fix for_each_entry (v1) Date: Mon, 15 Jul 2019 10:37:00 -0400 Message-Id: <20190715143705.117908-5-joel@joelfernandes.org> X-Mailer: git-send-email 2.22.0.510.g264f2c817a-goog In-Reply-To: <20190715143705.117908-1-joel@joelfernandes.org> References: <20190715143705.117908-1-joel@joelfernandes.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using the previous support added, use it for adding lockdep conditions to list usage here. Signed-off-by: Joel Fernandes (Google) --- net/ipv4/fib_frontend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 317339cd7f03..26b0fb24e2c2 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -124,7 +124,8 @@ struct fib_table *fib_get_table(struct net *net, u32 id) h = id & (FIB_TABLE_HASHSZ - 1); head = &net->ipv4.fib_table_hash[h]; - hlist_for_each_entry_rcu(tb, head, tb_hlist) { + hlist_for_each_entry_rcu(tb, head, tb_hlist, + lockdep_rtnl_is_held()) { if (tb->tb_id == id) return tb; } -- 2.22.0.510.g264f2c817a-goog