Messages in this thread Patch in this message | | | Subject | Re: Bug in net/ipv6/ip6_fib.c:fib6_dump_table() | From | Eric Dumazet <> | Date | Fri, 22 Jun 2012 20:13:05 +0200 |
| |
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; }
| |