]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.4.51/ipv6-assign-rt6_info-to-inet6_ifaddr-in-init_loopback.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.4.51 / ipv6-assign-rt6_info-to-inet6_ifaddr-in-init_loopback.patch
CommitLineData
7a674766
GKH
1From 1814b8d9a23c63988bdd6083ee25b87403a2bbae Mon Sep 17 00:00:00 2001
2From: Gao feng <gaofeng@cn.fujitsu.com>
3Date: Sun, 2 Jun 2013 22:16:21 +0000
4Subject: ipv6: assign rt6_info to inet6_ifaddr in init_loopback
5
6From: Gao feng <gaofeng@cn.fujitsu.com>
7
8[ Upstream commit 534c877928a16ae5f9776436a497109639bf67dc ]
9
10Commit 25fb6ca4ed9cad72f14f61629b68dc03c0d9713f
11"net IPv6 : Fix broken IPv6 routing table after loopback down-up"
12forgot to assign rt6_info to the inet6_ifaddr.
13When disable the net device, the rt6_info which allocated
14in init_loopback will not be destroied in __ipv6_ifa_notify.
15
16This will trigger the waring message below
17[23527.916091] unregister_netdevice: waiting for tap0 to become free. Usage count = 1
18
19Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com>
20Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
21Signed-off-by: David S. Miller <davem@davemloft.net>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23---
24 net/ipv6/addrconf.c | 4 +++-
25 1 file changed, 3 insertions(+), 1 deletion(-)
26
27--- a/net/ipv6/addrconf.c
28+++ b/net/ipv6/addrconf.c
29@@ -2432,8 +2432,10 @@ static void init_loopback(struct net_dev
30 sp_rt = addrconf_dst_alloc(idev, &sp_ifa->addr, 0);
31
32 /* Failure cases are ignored */
33- if (!IS_ERR(sp_rt))
34+ if (!IS_ERR(sp_rt)) {
35+ sp_ifa->rt = sp_rt;
36 ip6_ins_rt(sp_rt);
37+ }
38 }
39 read_unlock_bh(&idev->lock);
40 }