When the NM_UNMANAGED_PLATFORM_INIT flag is cleared last in device_link_changed(), a recheck-assume is scheduled and then the device goes immediately to UNAVAILABLE. During the state transition, addresses and routes are removed from the interface. Then, recheck-assume finds that the device can be assumed but it's too late since the device was already deconfigured.
This is a problem as the whole point of assuming a device is to activate a connection while leaving the device untouched.
In the NMCI "dracut_NM_vlan_over_bridge and dracut_NM_vlan_over_bond" test, NM in real root tries to assume a vlan device that was activated in initrd. When the interface gets deconfigured in UNAVAILABLE, the connection to the NFS server breaks and the rootfs becomes inaccessible.
The fix to this problem is to delay state transitions in device_link_changed() to a idle handler, so that recheck-assume can run before.
Fixes-test: dracut_NM_vlan_over_bridge and dracut_NM_vlan_over_bond