IoCreateDevice() was called too early, when a spinlock was acquired. Create ISAPNP_LOGICAL_DEVICE structure when a device is detected, and call IoCreateDevice() later, when required.
bfd8a848