Verifier false positive

“IoReleaseRemoveLock tag doesn’t match previous IoAcquireRemoveLock tag.”

I am using an Irp for the tag. The Irp is used in the call to acquire the lock before IoCallDriver. The same Irp is used in the call to release the lock in the completion routine.

The address of the Irp is of course the same in both calls.

The Irp is allocated from (and initialised), and freed to, a look aside list before and after the acquire and release lock calls respectively.

This code actually runs fine, for many days in fact constantly shipping data, but when Verifier barfed I had the system halted for a long time. As soon as I hit go, it crashed.

And the text of this error is misleading, tags do not need to be acquired and released in order, which is what the error implies.

Oh yes, this is Windows ‘11’ (AKA 1607)