Hi All,
I have question regarding freeing of physical pages mapped to MDL using this function MmFreePagesFromMdl.
I have a code flow like this.
- User mode allocates a memory and invokes IOCTL (Direct_IN)
- My driver finds the physical pages passed in the MDL structure from IRP
- Programs the device using the physical pages
- Then try to deallocate the memory occupied by the physical pages
Does this cause any memory corruption or access violation since the I feel the system also will try to free the physical pages when completing the IRP request.
Any pointer will be appreciated…
Thanks,