From: Ursula Braun Date: Sun, 24 Oct 2010 23:06:43 +0000 (+0000) Subject: ipv6: fix refcnt problem related to POSTDAD state X-Git-Tag: upstream/snapshot3+hdmi~12461^2~144 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=853dc2e03ddd0c49885ed55c48755d2b1073122a;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ipv6: fix refcnt problem related to POSTDAD state After running this bonding setup script modprobe bonding miimon=100 mode=0 max_bonds=1 ifconfig bond0 10.1.1.1/16 ifenslave bond0 eth1 ifenslave bond0 eth3 on s390 with qeth-driven slaves, modprobe -r fails with this message unregister_netdevice: waiting for bond0 to become free. Usage count = 1 due to twice detection of duplicate address. Problem is caused by a missing decrease of ifp->refcnt in addrconf_dad_failure. An extra call of in6_ifa_put(ifp) solves it. Problem has been introduced with commit f2344a131bccdbfc5338e17fa71a807dee7944fa. Signed-off-by: Ursula Braun Cc: David S. Miller Cc: Herbert Xu Acked-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index ef6fc16..e048ec6 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1427,8 +1427,10 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp) { struct inet6_dev *idev = ifp->idev; - if (addrconf_dad_end(ifp)) + if (addrconf_dad_end(ifp)) { + in6_ifa_put(ifp); return; + } if (net_ratelimit()) printk(KERN_INFO "%s: IPv6 duplicate address %pI6c detected!\n",