From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 2 Jun 2019 09:00:14 +0200 From: Pavel Machek Subject: Re: [RFC 2/6] ipv4: add lockdep condition to fix for_each_entry Message-ID: <20190602070014.GA543@amd> References: <20190601222738.6856-1-joel@joelfernandes.org> <20190601222738.6856-3-joel@joelfernandes.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u3/rZRmxL6MmkK24" Content-Disposition: inline In-Reply-To: <20190601222738.6856-3-joel@joelfernandes.org> To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, Alexey Kuznetsov , Bjorn Helgaas , Borislav Petkov , "David S. Miller" , edumazet@google.com, Greg Kroah-Hartman , Hideaki YOSHIFUJI , "H. Peter Anvin" , Ingo Molnar , Josh Triplett , keescook@chromium.org, kernel-hardening@lists.openwall.com, Lai Jiangshan , Len Brown , linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, Mathieu Desnoyers , neilb@suse.com, netdev@vger.kernel.org, oleg@redhat.com, "Paul E. McKenney" , peterz@infradead.org, "Rafael J. Wysocki" , rcu@vger.kernel.org, Steven Rostedt , Tejun Heo , Thomas Gleixner , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" List-ID: --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat 2019-06-01 18:27:34, Joel Fernandes (Google) wrote: > Signed-off-by: Joel Fernandes (Google) This really needs to be merged to previous patch, you can't break compilation in middle of series... Or probably you need hlist_for_each_entry_rcu_lockdep() macro with additional argument, and switch users to it. Pavel > net/ipv4/fib_frontend.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c > index b298255f6fdb..ef7c9f8e8682 100644 > --- a/net/ipv4/fib_frontend.c > +++ b/net/ipv4/fib_frontend.c > @@ -127,7 +127,8 @@ struct fib_table *fib_get_table(struct net *net, u32 = id) > h =3D id & (FIB_TABLE_HASHSZ - 1); > =20 > head =3D &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 =3D=3D id) > return tb; > } --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlzzc/4ACgkQMOfwapXb+vLLpgCfQoWBSykNcFHCJ34MeV9TE4Es /qIAn1NEzcdOi5m4WfplnoKX79226+10 =Uigu -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24--