[patch 070/101] Fix anycast procfs device leak

From: Greg KH
Date: Wed Mar 07 2007 - 12:31:40 EST


From: David Stevens <dlstevens@xxxxxxxxxx>

[IPV6]: /proc/net/anycast6 unbalanced inet6_dev refcnt

From: David Stevens <dlstevens@xxxxxxxxxx>

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@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
net/ipv6/anycast.c | 1 +
1 file changed, 1 insertion(+)

--- linux-2.6.20.1.orig/net/ipv6/anycast.c
+++ linux-2.6.20.1/net/ipv6/anycast.c
@@ -462,6 +462,7 @@ static inline struct ifacaddr6 *ac6_get_
break;
}
read_unlock_bh(&idev->lock);
+ in6_dev_put(idev);
}
return im;
}

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/