On Sat, 21 Oct 2023 00:18:53 +0200 Andrew Lunn wrote: > > + err = rtnl_configure_link(peer, ifmp, 0, NULL); > > + if (err < 0) > > + goto err_configure_peer; > > Seeing code after calling register_netdevice() often means bugs. The > interface is live, and in use before the function even returns. The > kernel can try to get an IP address, mount an NFS root etc. This might > be safe, because you have two linked interfaces here, and the other > one is not yet registered. Maybe some comment about this would be > good, or can the rtnl_configure_link() be done earlier? These are in the newlink callback, rtnl is held throughout. Which is not to say that corresponding code in veth wasn't a source of many bugs :S