• Zebediah Figura's avatar
    ntoskrnl/tests: Also test that IoInvalidateDeviceRelations() during device… · 92456eb7
    Zebediah Figura authored
    ntoskrnl/tests: Also test that IoInvalidateDeviceRelations() during device enumeration doesn't deadlock.
    
    wineusb enumerates new devices and completes IRPs from the same thread (as if it
    were an IRQ thread). On the other hand, the Hauppauge cx231xx USB driver
    performs I/O from within IRP_MN_START_DEVICE. If the wineusb "IRQ" thread is
    currently trying to report a new device, it won't be able to report I/O
    completion, resulting in a deadlock.
    
    Although wineusb could be modified to use more threads, these tests show that
    calling IoInvalidateDeviceRelations() should not block in this situation.
    92456eb7
driver_pnp.c 31.8 KB