[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1340388785.4604.11442.camel@edumazet-glaptop>
Date: Fri, 22 Jun 2012 20:13:05 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Josh Hunt <johunt@...mai.com>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"kaber@...sh.net" <kaber@...sh.net>,
Debabrata Banerjee <dbavatar@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"yoshfuji@...ux-ipv6.org" <yoshfuji@...ux-ipv6.org>,
"jmorris@...ei.org" <jmorris@...ei.org>,
"pekkas@...core.fi" <pekkas@...core.fi>,
"kuznet@....inr.ac.ru" <kuznet@....inr.ac.ru>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Bug in net/ipv6/ip6_fib.c:fib6_dump_table()
On Fri, 2012-06-22 at 08:44 -0500, Josh Hunt wrote:
> Ahh. That makes sense and is what Alexey said before I just didn't put
> it all together. So we are OK reverting this patch? I cannot find a path
> where the walker's pointers are updated without the tb6_lock write_lock.
>
There was a bug somewhere, not sure we want to NULL dereference again.
Following fix should at least avoid a never ending dump
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 74c21b9..6083276 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1349,8 +1349,8 @@ static int fib6_walk_continue(struct fib6_walker_t *w)
if (w->leaf && fn->fn_flags & RTN_RTINFO) {
int err;
- if (w->count < w->skip) {
- w->count++;
+ if (w->skip) {
+ w->skip--;
continue;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists