From: Eric Dumazet <eric.dumazet@gmail.com>
To: paulmck@linux.vnet.ibm.com, Stephen Hemminger <shemminger@vyatta.com>
Cc: Valdis.Kletnieks@vt.edu,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Patrick McHardy <kaber@trash.net>,
"David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org,
netdev@vger.kernel.org
Subject: [PATCH net-next-2.6] net: if6_get_next() fix
Date: Mon, 03 May 2010 21:46:47 +0200 [thread overview]
Message-ID: <1272916007.2407.75.camel@edumazet-laptop> (raw)
In-Reply-To: <20100503181629.GJ2597@linux.vnet.ibm.com>
Le lundi 03 mai 2010 à 11:16 -0700, Paul E. McKenney a écrit :
> I would be happy to if I could find the commit creating
> hlist_for_each_entry_continue_rcu()...
>
> I do see a ca. 2008 patch from Stephen Hemminger:
>
> http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg264661.html
>
> According to http://patchwork.ozlabs.org/patch/47997/, this is
> going up the networking tree as of March 18, 2010.
>
> So I would be happy to push the patch below, but to do so, I will need
> to adopt the portion of Stephen's patch that created this primitive.
>
Hmm, I realize there is a true bug introduced by Stephen patch
Then, net-next-2.6 doesnt yet have your commit Paul to relax
hlist_for_each_entry_rcu(), so its a bit difficult to continue the work.
Thanks
[PATCH net-next-2.6] net: if6_get_next() fix
Must use rcu variant, we are in a rcu_read_lock_bh() section
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 34d2d64..16bb85c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2979,7 +2979,7 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq,
return ifa;
while (++state->bucket < IN6_ADDR_HSIZE) {
- hlist_for_each_entry(ifa, n,
+ hlist_for_each_entry_rcu(ifa, n,
&inet6_addr_lst[state->bucket], addr_lst) {
if (net_eq(dev_net(ifa->idev->dev), net))
return ifa;
next prev parent reply other threads:[~2010-05-03 19:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201004290021.o3T0L04Y028017@imap1.linux-foundation.org>
2010-05-02 17:46 ` mmotm 2010-04-28 - RCU whinges Valdis.Kletnieks
2010-05-03 5:38 ` Eric Dumazet
2010-05-03 5:41 ` Eric Dumazet
2010-05-03 5:43 ` Eric Dumazet
2010-05-03 5:55 ` David Miller
2010-05-10 15:40 ` Patrick McHardy
2010-05-10 15:56 ` Eric Dumazet
2010-05-10 15:57 ` Eric Dumazet
2010-05-10 16:03 ` Patrick McHardy
2010-05-10 16:04 ` Patrick McHardy
2010-05-10 15:57 ` Paul E. McKenney
2010-05-10 16:12 ` David Miller
2010-05-10 16:27 ` Patrick McHardy
2010-05-03 14:30 ` Valdis.Kletnieks
2010-05-03 14:48 ` Eric Dumazet
2010-05-03 14:58 ` Eric Dumazet
2010-05-03 15:29 ` Valdis.Kletnieks
2010-05-03 15:43 ` Paul E. McKenney
2010-05-03 16:14 ` Eric Dumazet
2010-05-03 18:16 ` Paul E. McKenney
2010-05-03 19:46 ` Eric Dumazet [this message]
2010-05-03 20:09 ` [PATCH net-next-2.6] net: if6_get_next() fix David Miller
2010-05-03 20:13 ` Eric Dumazet
2010-05-03 20:24 ` David Miller
2010-05-03 20:50 ` Eric Dumazet
2010-05-03 22:17 ` David Miller
2010-05-03 22:48 ` Paul E. McKenney
2010-05-03 22:52 ` Paul E. McKenney
2010-05-03 22:54 ` David Miller
2010-05-10 16:53 ` mmotm 2010-04-28 - RCU whinges Patrick McHardy
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=1272916007.2407.75.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=shemminger@vyatta.com \
/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