From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Balakumaran Kannan <kumaran.4353@gmail.com>,
yoshfuji@linux-ipv6.org, davem@davemloft.net,
Patrick McHardy <kaber@trash.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
jmorris@namei.org, Balakumaran.Kannan@ap.sony.com,
maruthi.thotad@ap.sony.com, netdev@vger.kernel.org,
jamshed.a@ap.sony.com, amit.agarwal@ap.sony.com,
takuzo.ohara@jp.sony.com, aaditya.kumar@ap.sony.com
Subject: Re: [PATCH v2] net IPv6 : Fix broken IPv6 routing table after loopback down-up
Date: Thu, 28 Mar 2013 11:23:56 -0700 [thread overview]
Message-ID: <20130328182356.GE3337@linux.vnet.ibm.com> (raw)
In-Reply-To: <1364478265.15753.42.camel@edumazet-glaptop>
On Thu, Mar 28, 2013 at 06:44:25AM -0700, Eric Dumazet wrote:
> On Thu, 2013-03-28 at 18:57 +0530, Balakumaran Kannan wrote:
> > IPv6 Routing table becomes broken once we do ifdown, ifup of the loopback(lo)
> > interface. After down-up, routes of other interface's IPv6 addresses through
> > 'lo' are lost.
> >
>
> > add_addr(idev, &in6addr_loopback, 128, IFA_HOST);
> > +
> > + /* Add routes to other interface's IPv6 addresses */
> > + rcu_read_lock();
> > + for_each_netdev_rcu(dev_net(dev), sp_dev) {
> > +
>
> We hold RTNL at this point, so why use RCU at all, and adding potential
> long latencies ?
>
> Just use for_each_netdev()
>
> This way, a preemption is still allowed.
Agreed, there is no point in using RCU when it is not needed.
That said...
Since v3.1, in CONFIG_PREEMPT=y kernels, rcu_read_lock() does not
disable preemption. In CONFIG_PREEMPT=n kernels, rcu_read_lock() does
disable preemption, but to no effect because preemption is already
disabled anyway.
The net effect is that rcu_read_lock() has no effect on preemption.
Thanx, Paul
> Also, I am not sure we need ipv6_find_idev()
>
> __in6_dev_get() should be OK.
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2013-03-28 18:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 13:27 [PATCH v2] net IPv6 : Fix broken IPv6 routing table after loopback down-up Balakumaran Kannan
2013-03-28 13:44 ` Eric Dumazet
2013-03-28 13:45 ` Eric Dumazet
2013-03-28 14:04 ` Balakumaran Kannan
2013-03-28 14:47 ` Balakumaran Kannan
2013-03-28 15:14 ` Balakumaran Kannan
2013-03-29 19:17 ` David Miller
2013-03-31 6:38 ` Balakumaran Kannan
2013-04-01 11:59 ` Balakumaran Kannan
2013-04-01 14:16 ` YOSHIFUJI Hideaki
2013-04-02 10:45 ` Balakumaran Kannan
2013-04-02 18:37 ` David Miller
2013-03-28 18:23 ` Paul E. McKenney [this message]
2013-03-28 18:49 ` Eric Dumazet
2013-03-28 19:39 ` Paul E. McKenney
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=20130328182356.GE3337@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=Balakumaran.Kannan@ap.sony.com \
--cc=aaditya.kumar@ap.sony.com \
--cc=amit.agarwal@ap.sony.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=jamshed.a@ap.sony.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kumaran.4353@gmail.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=maruthi.thotad@ap.sony.com \
--cc=netdev@vger.kernel.org \
--cc=takuzo.ohara@jp.sony.com \
--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;
as well as URLs for NNTP newsgroup(s).