KMDF InCallerContext question

>Thanks for that description of how MmUnlockPages works

It first calls unmap, if the pages were mapped to system PTEs according to MDL
flags.

Then it scans the MDL tail and calls the internal MiDecrementReferenceCount
routine for each PFN entry in the MDL tail.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

> On a related note, I see that *someone* used MmGetMdlVirtualAddress()

instead of MmGetSystemAddressForMdlSafe() to get the VA.

A very bad idea, this will return the process-specific user-space address.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com