Skip to content

Commit

Permalink
ipv6: assign rt6_info to inet6_ifaddr in init_loopback
Browse files Browse the repository at this point in the history
[ Upstream commit 534c877 ]

Commit 25fb6ca
"net IPv6 : Fix broken IPv6 routing table after loopback down-up"
forgot to assign rt6_info to the inet6_ifaddr.
When disable the net device, the rt6_info which allocated
in init_loopback will not be destroied in __ipv6_ifa_notify.

This will trigger the waring message below
[23527.916091] unregister_netdevice: waiting for tap0 to become free. Usage count = 1

Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Gao feng authored and gregkh committed Jun 27, 2013
1 parent 64274c3 commit 0e7d0e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2360,8 +2360,10 @@ static void init_loopback(struct net_device *dev)
sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0);

/* Failure cases are ignored */
if (!IS_ERR(sp_rt))
if (!IS_ERR(sp_rt)) {
sp_ifa->rt = sp_rt;
ip6_ins_rt(sp_rt);
}
}
read_unlock_bh(&idev->lock);
}
Expand Down

0 comments on commit 0e7d0e5

Please sign in to comment.