On Mon, Aug 26, 2019 at 04:25:05PM +0800, Xin Long wrote: > When creating a xfrmi dev, it always holds the phydev. The xfrmi dev should > be deleted when the phydev is being unregistered, so that the phydev can be > put on time. Otherwise the phydev's deleting will get stuck: > > # ip link add dummy10 type dummy > # ip link add xfrmi10 type xfrm dev dummy10 > # ip link del dummy10 > > The last command blocks and dmesg shows: > > unregister_netdevice: waiting for dummy10 to become free. Usage count = 1 > > This patch fixes it by adding NETDEV_UNREGISTER event process for xfrmi.
There is already a patch in the ipsec tree that fixes this issue in a different way. Please base xfrm patches on the ipsec/ipsec-next tree to avoid double work. Thanks anyway!