From: Eric Dumazet <eric.dumazet@gmail.com>
To: Thomas Graf <tgraf@infradead.org>
Cc: Amerigo Wang <amwang@redhat.com>,
linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
"Pekka Savola (ipv6)" <pekkas@netcore.fi>,
James Morris <jmorris@namei.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>,
netdev@vger.kernel.org
Subject: Re: [Patch] net: kill an RCU warning in inet_fill_link_af()
Date: Wed, 01 Dec 2010 18:31:57 +0100 [thread overview]
Message-ID: <1291224717.2856.1021.camel@edumazet-laptop> (raw)
In-Reply-To: <20101201171801.GA22009@canuck.infradead.org>
Le mercredi 01 décembre 2010 à 12:18 -0500, Thomas Graf a écrit :
> On Wed, Dec 01, 2010 at 05:03:06PM +0100, Eric Dumazet wrote:
> > [PATCH net-next-2.6] net: kill an RCU warning in inet_fill_link_af()
> >
> > commits 9f0f7272 (ipv4: AF_INET link address family) and cf7afbfeb8c
> > (rtnl: make link af-specific updates atomic) used incorrect
> > __in_dev_get_rcu() in RTNL protected contexts, triggering PROVE_RCU
> > warnings.
> >
> > Switch to __in_dev_get_rtnl(), wich is more appropriate, since we hold
> > RTNL.
> >
> > Based on a report and initial patch from Amerigo Wang.
>
> RTNL is not held while dumping, it is only held for get and set, but we
> still hold rcu readlocks while dumping so there should be no asserts
> triggered. Thanks for fixing this.
Are you sure RTNL is not held while dumping ?
Patrick did the change to hold RTNL while dumping too, 3.5 years ago.
Check commits 6313c1e0992fea, 1c2d670f3660e9103 ([RTNETLINK]: Hold
rtnl_mutex during netlink dump callbacks)
If this was the case (not holding RTNL), we should use
rcu_dereference(), not rtnl_dereference()
next prev parent reply other threads:[~2010-12-01 17:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 11:14 [Patch] net: kill an RCU warning in inet_fill_link_af() Amerigo Wang
2010-12-01 11:21 ` Eric Dumazet
2010-12-01 11:37 ` [PATCH net-next-2.6] : __in_dev_get_rtnl() can use rtnl_dereference() Eric Dumazet
2010-12-06 21:00 ` David Miller
2010-12-01 16:03 ` [Patch] net: kill an RCU warning in inet_fill_link_af() Eric Dumazet
2010-12-01 17:18 ` Thomas Graf
2010-12-01 17:31 ` Eric Dumazet [this message]
2010-12-01 22:22 ` Thomas Graf
2010-12-02 3:14 ` Cong Wang
2010-12-06 21:01 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291224717.2856.1021.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pekkas@netcore.fi \
--cc=tgraf@infradead.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox