]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] IPV6: /proc/net/anycast6 unbalanced inet6_dev refcnt
authorDavid Stevens <dlstevens@us.ibm.com>
Tue, 27 Feb 2007 00:28:56 +0000 (16:28 -0800)
committerWilly Tarreau <w@1wt.eu>
Sat, 25 Aug 2007 15:24:17 +0000 (17:24 +0200)
Reading /proc/net/anycast6 when there is no anycast address
on an interface results in an ever-increasing inet6_dev reference
count, as well as a reference to the netdevice you can't get rid of.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Marcus Meissner <meissner@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/ipv6/anycast.c

index fe0c895d03a5099804d202b3e78a309ded8efc32..7cf524847e2ac221acd247337af4dc49c1e54678 100644 (file)
@@ -67,6 +67,7 @@ ip6_onlink(struct in6_addr *addr, struct net_device *dev)
                                break;
                }
                read_unlock_bh(&idev->lock);
+               in6_dev_put(idev);
        }
        rcu_read_unlock();
        return onlink;