netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6: don't call addrconf_dst_alloc again when enable lo
@ 2013-06-16  3:14 Gao feng
  2013-06-20  6:05 ` David Miller
  0 siblings, 1 reply; 19+ messages in thread
From: Gao feng @ 2013-06-16  3:14 UTC (permalink / raw)
  To: davem; +Cc: kumaran.4353, netdev, Gao feng

If we disable all of the net interfaces, and enable
un-lo interface before lo interface, we already allocated
the addrconf dst in ipv6_add_addr. So we shouldn't allocate
it again when we enable lo interface.

Otherwise the message below will be triggered.
unregister_netdevice: waiting for sit1 to become free. Usage count = 1

This problem is introduced by commit 25fb6ca4ed9cad72f14f61629b68dc03c0d9713f
"net IPv6 : Fix broken IPv6 routing table after loopback down-up"

Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
 net/ipv6/addrconf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 1bbf744..77b6261 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2655,6 +2655,9 @@ static void init_loopback(struct net_device *dev)
 			if (sp_ifa->flags & (IFA_F_DADFAILED | IFA_F_TENTATIVE))
 				continue;
 
+			if (sp_ifa->rt)
+				continue;
+
 			sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0);
 
 			/* Failure cases are ignored */
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-01-17  4:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-16  3:14 [PATCH] ipv6: don't call addrconf_dst_alloc again when enable lo Gao feng
2013-06-20  6:05 ` David Miller
2013-12-31  3:57   ` Hannes Frederic Sowa
2014-01-02  5:48     ` chenweilong
2014-01-02  6:03       ` Hannes Frederic Sowa
2014-01-02  8:13         ` chenweilong
2014-01-02  8:32           ` Hannes Frederic Sowa
2014-01-02  9:08             ` chenweilong
2014-01-02  6:54       ` Hannes Frederic Sowa
2014-01-02  7:58         ` chenweilong
2014-01-02  8:23           ` Hannes Frederic Sowa
2014-01-02  9:33             ` chenweilong
2014-01-03  6:53               ` Hannes Frederic Sowa
2014-01-08  7:50                 ` Gao feng
2014-01-08  8:05                   ` Hannes Frederic Sowa
2014-01-08  8:42                     ` Gao feng
2014-01-08  8:55                       ` Hannes Frederic Sowa
2014-01-17  2:02                         ` chenweilong
2014-01-17  4:09                           ` Hannes Frederic Sowa

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).