Hi,
For the last couple of weeks I have been experimenting with writing
file system filter drivers for windows 2000. For testing purposes I
implemented a dispatch routine in my filter driver that would
“complete” (fail) all incoming IRPs.
This is basically what I do:
IoSetCompletionRoute(irp, routine, FALSE, FALSE, FALSE);
IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST;
IoCompleteRequest(irp, IRP_NO_INCREMENT);
return STATUS_INVALID_REQUEST;
The reason I implemented the dispatch routine like this is because the
filter driver I will eventually be writing will fail some IRPs due to
ACLs or other circumenstances and I wanted to see how the
kernel would react to this.
Most of the time everything works as expected, but sometimes I get a
BSOD with a KERNEL_STACK/DATA_INPAGE_ERROR. Further
investigation using softice reveals that the BSOD seems to happen only
when I complete an IRP coming from the VMM (backtrace shows
mm/rtl*Memory functions) at APC_LEVEL.
My Question(s):
Is the BSOD to be “expected” when i fail an IRP coming from the VMM?
What is the correct way to fail / complete such an IRP?
I hope some of the people here can help me out,
Kind Regards,
Joost Pol