--- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -273,7 +273,6 @@ static int ip6_tnl_create2(struct net_de strcpy(t->parms.name, dev->name); - dev_hold(dev); ip6_tnl_link(ip6n, t); return 0; @@ -1845,6 +1844,7 @@ ip6_tnl_dev_init_gen(struct net_device * if (!(t->parms.flags & IP6_TNL_F_IGN_ENCAP_LIMIT)) dev->mtu -= 8; + dev_hold(dev); return 0; destroy_dst: