[NTDEV] IoAllocateMdl ...

Ready for this? It’s another one of those “It works in NT4” questions.

First, here is what I get in WinDbg:

Access violation - code c0000005 (!!! second chance !!!)
ntkrnlmp!IoAllocateMdl+f5:
8011cfe9 8b10 mov edx,[eax]

This is what I am doing:

PMDL pMdl = IoAllocateMdl(packet->DataBuffer,
packet->Length,
TRUE,
FALSE,
Irp);
__try {
MmProbeAndLockPages(pMdl,

Packet->DataBuffer is a buffer coming up from the user’s address space with
a length of
packet->Length. I’ve stepped it through the assembly for IoAllocateMdl and
what I see is that the DataBuffer parameter (0x007d0040) pushed onto the
stack gets overloaded with A0. This is so simple I cannot see the problem,
and of course my first thought is “bug in IoAllocateMdl” but I doubt it.

Gary


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com