I have a question about some warnings in MSDN.
In my minifilter, I subscribe to IRP_MJ_READ, and I need to access the buffers in the Post callback. After I perform computations on the buffers, I would like to send a message (FltSendMessage) to communicate to my other components.
I am aware that this is not allowed at DPC, and that PostRead will sometimes happen at DPC. I was therefore planning to use FltQueueDeferredIoWorkItem, or FltDoCompletionProcessingWhenSafe.
There is, however, the following warning in MSDN for both functions:
To avoid deadlocks, a minifilter must not post an I/O operation to a system work queue in the post-operation callback for any I/O operations that a driver can complete directly in the storage stack, such as the following:
But I note that in the swap buffers minifilter example, there is a call to FltDoCompletionProcessingWhenSafe, which contradicts the MSDN warning...
What is the correct way of handling calls that are forbidden at DPC in PostRead?
Is it okay to ignore the warning, as the sample seems to do?
Or rather, under which conditions can we ignore the warning?
If this question has already been answered, please send me a link...