Re: [BUG] ipv4: unregister_netdevice hang after flushing a DVMRP tunnel vif

From: Ido Schimmel

Date: Tue Dec 01 2026 - 10:53:54 EST


On Tue, Dec 01, 2026 at 11:52:48AM +0000, Yu Junzhe wrote:
> Hello,
>
> I am reporting a netdevice refcount hang in IPv4 multicast routing.
> MRT_ADD_VIF with VIFF_TUNNEL creates a dvmrp<vifi> IPIP device. MRT_FLUSH
> with MRT_FLUSH_VIFS_STATIC removes that vif and unregisters the device, and
> the unregister wait never finishes. The kernel prints:
>
> unregister_netdevice: waiting for dvmrp3 to become free. Usage count = 2

More useful when you enable CONFIG_NET_DEV_REFCNT_TRACKER:

unregister_netdevice: waiting for dvmrp3 to become free. Usage count = 2
ref_tracker: netdev@00000000ee16fe93 has 1/1 users at
netdev_get_by_index+0xb3/0xd0
fib6_nh_init+0x206/0xa00
ip6_route_info_create_nh+0x10d/0x2f0
ip6_route_add+0x5a/0x100
addrconf_prefix_route+0xf6/0x140
addrconf_add_linklocal+0xa6/0x150
addrconf_addr_gen+0x14f/0x160
addrconf_notify+0x460/0xa00
...
dev_open+0x36/0x90
ipmr_new_tunnel+0x140/0x200

[...]

> On Linux 7.3.0-rc4 (93f51579e, tag v7.3-rc4), net/ipv4/ipmr.c:

Please always test on the latest kernel. Bugs are being fixed all the
time. This one is probably fixed by commit a0fe1a3f390a ("ipv6: Flush
rt->from in rt6_uncached_list_flush_dev().") in 7.4-rc2.