-
0928c4df
by Matteo Bruni at 2025-09-09T21:08:35+02:00
hidclass: Set Status for pending IRPs of removed devices to STATUS_DEVICE_NOT_CONNECTED.
Also adjust xinput to handle that.
-
4ba2f77f
by Matteo Bruni at 2025-09-09T21:08:37+02:00
hidclass: Fix check for early IRP cancellation.
This matches
https://learn.microsoft.com/en-us/windows-hardware/drivers/kernel/using-a-driver-supplied-spin-lock
and, as far as I can see, is the intended idea and what the comment
implies.
The idea, as I understand it, is to avoid a TOCTOU hazard by first
setting the cancel routine and only afterwards checking the Cancel
flag. If it's set while the previous cancel routine (returned by the
second IoSetCancelRoutine call) is not NULL, that means it's been
enabled before our first IoSetCancelRoutine call and we have to take
care of it.
Conversely, if there is no previous routine set, it must mean that
ntoskrnl has removed the routine we just set and it's going to call
it, or has already called it (and it's probably now trying to acquire
the spinlock). In that case we leave handling the cancellation to the
routine and do nothing special here.
-
2dc4cfe7
by Matteo Bruni at 2025-09-09T21:08:39+02:00
nsiproxy: Fix check for early IRP cancellation.
-
4d86d82f
by Matteo Bruni at 2025-09-09T21:08:39+02:00
dinput/tests: Fix check for early IRP cancellation.
-
5b3f17db
by Matteo Bruni at 2025-09-09T21:08:39+02:00
http.sys: Fix check for early IRP cancellation.