ubi: Fix race condition between ubi device creation and udev