hidclass.sys: Properly quit hid_device_thread when both completion event and halt event are signaled.

Aric Stewart aric at codeweavers.com
Mon Dec 28 09:55:29 CST 2015


Sorry for the delayed review, I have been traveling.

I understand the issue your trying to fix, but I worry that you could get yourself into a bad state where if a driver is misbehaving and is blocked or crashes while processing an IRP then the halt event will never get processed as we will be waiting INFINITE on an event that may never come. 

I dont know which is the more likely or problematic case. 

What I may suggest is keep the WaitForMultipleObjects(2, events, FALSE, INFINITE) and instead of relying on the return code you could do an additional 
WaitForSingleObject(ext->halt_event, 0) to determine if exit_now should be set. 

-aric



More information about the wine-devel mailing list