From: Cong Wang <amwang@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org, jiri@resnulli.us
Subject: Re: [Patch net-next v4] netpoll: fix a rtnl lock assertion failure
Date: Thu, 17 Jan 2013 12:18:04 +0800 [thread overview]
Message-ID: <1358396284.3855.16.camel@cr0> (raw)
In-Reply-To: <20130116.225413.1184047803896995845.davem@davemloft.net>
On Wed, 2013-01-16 at 22:54 -0500, David Miller wrote:
> From: Cong Wang <amwang@redhat.com>
> Date: Thu, 17 Jan 2013 11:30:18 +0800
>
> > On Wed, 2013-01-16 at 17:24 -0800, Eric Dumazet wrote:
> >> On Tue, 2013-01-15 at 17:34 +0800, Cong Wang wrote:
> >> > if (np->dev_name)
> >> > - ndev = dev_get_by_name(&init_net, np->dev_name);
> >> > + ndev = __dev_get_by_name(&init_net, np->dev_name);
> >>
> >> This change brings interesting bugs.
> >
> > Hmm, I didn't realize __dev_get_by_name() doesn't hold the device, so
> > just call dev_hold() after this?
>
> Why not just... call dev_get_by_name()? It doesn't hurt to over-RCU
> lock.
>
Just that taking RCU read lock while having rtnl lock is unnecessary, no
other reason.
next prev parent reply other threads:[~2013-01-17 4:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 9:34 [Patch net-next v4] netpoll: fix a rtnl lock assertion failure Cong Wang
2013-01-16 20:27 ` David Miller
2013-01-17 1:24 ` Eric Dumazet
2013-01-17 3:30 ` Cong Wang
2013-01-17 3:54 ` David Miller
2013-01-17 4:18 ` Cong Wang [this message]
2013-01-17 4:53 ` Eric Dumazet
2013-01-17 3:52 ` David Miller
2013-01-17 4:00 ` Cong Wang
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=1358396284.3855.16.camel@cr0 \
--to=amwang@redhat.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).