]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Fix anycast procfs device leak
authorDavid Stevens <dlstevens@us.ibm.com>
Tue, 27 Feb 2007 19:14:00 +0000 (11:14 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 18:50:27 +0000 (10:50 -0800)
[IPV6]: /proc/net/anycast6 unbalanced inet6_dev refcnt

From: David Stevens <dlstevens@us.ibm.com>

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.

From: David Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv6/anycast.c

index a9604764e015adc03c77cdcea9f50d63c947235b..fe0c895d03a5099804d202b3e78a309ded8efc32 100644 (file)
@@ -462,6 +462,7 @@ static inline struct ifacaddr6 *ac6_get_first(struct seq_file *seq)
                        break;
                }
                read_unlock_bh(&idev->lock);
+               in6_dev_put(idev);
        }
        return im;
 }