* [PATCH] ipv6: fix inet6_dev refcnt with IPV6_PRIVACY enabled
@ 2010-11-21 19:58 Sergey Senozhatsky
0 siblings, 0 replies; only message in thread
From: Sergey Senozhatsky @ 2010-11-21 19:58 UTC (permalink / raw)
To: David S. Miller
Cc: netdev, linux-kernel, Pekka Savola (ipv6), Hideaki YOSHIFUJI
When IPV6_PRIVACY is enabled, in ipv6_add_dev we have second extra
in6_dev_hold while preparing to call ipv6_regen_rndid, and only
one in6_dev_put call in addrconf_ifdown for inet6_dev devices with
active regen_timer.
That leaves inet6_dev with refcnt equals to 1 and blocks device unregistration:
"unregister_netdevice: waiting for usb0 to become free. Usage count = 1"
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
net/ipv6/addrconf.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 2fc35b3..541f773 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -425,7 +425,6 @@ static struct inet6_dev * ipv6_add_dev(struct net_device *dev)
dev->name);
ndev->cnf.use_tempaddr = -1;
} else {
- in6_dev_hold(ndev);
ipv6_regen_rndid((unsigned long) ndev);
}
#endif
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-11-21 19:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-21 19:58 [PATCH] ipv6: fix inet6_dev refcnt with IPV6_PRIVACY enabled Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).