KeTryToAcquireSpinLockAtDpcLevel()

I just noticed a possible documentation error for the function KeTryToAcquireSpinLockAtDpcLevel(), it says that you should release the spin lock with KeReleaseSpinLock() but all the other “AtDpcLevel” functions has a separate release function that is called KeReleaseSpinLockFromDpcLevel() so I would like to ask if this is a documentation error or if there is something special with the “Try” function so it is true you should use the ordinary release function?

See https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-ketrytoacquirespinlockatdpclevel

What Saved Irql would you give it?

@Dejan_Maksimovic said:
What Saved Irql would you give it?

Exactly! There are no saved IRQL to give to the release function, however it would work if one gives it the “false” value DPC_LEVEL!

Normally the IRQL is inferred from control flow. If you are confident to call KeAcquireSpinLockAtDpcLevel, you should be confident that you know what to pass to KeReleaseSpinLock.