From: Herbert Xu Date: Sat, 12 Nov 2005 20:12:05 +0000 (-0800) Subject: [IPV6]: Fix rtnetlink dump infinite loop X-Git-Tag: v2.6.15-rc2~218 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efacfbcb6c88677809f44a574fbcd9824835dccb;p=linux-2.6 [IPV6]: Fix rtnetlink dump infinite loop The recent change to netlink dump "done" callback handling broke IPv6 which played dirty tricks with the "done" callback. This causes an infinite loop during a dump. The following patch fixes it. This bug was reported by Jeff Garzik. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/ipv6/route.c b/net/ipv6/route.c index f7f42c3e96..a7a537b505 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1701,10 +1701,8 @@ static void fib6_dump_end(struct netlink_callback *cb) fib6_walker_unlink(w); kfree(w); } - if (cb->args[1]) { - cb->done = (void*)cb->args[1]; - cb->args[1] = 0; - } + cb->done = (void*)cb->args[1]; + cb->args[1] = 0; } static int fib6_dump_done(struct netlink_callback *cb)