I had to update a WDM driver recently and in doing so decided to review all the code.
(Yes it should be ported to WDF, but that's a task for another day...)
In reviewing the code, I found that the cancellation logic and cancel routine were improperly implemented.
The following document from Microsoft was very useful to me.
The section "Cancel Logic with a Driver-Supplied Lock" was most helpful.
It helped me better understand the possible race conditions that can happen and the proper way to deal with them.
I expect most people are probably using WDF and may not have to deal with this, but I thought I would share it with the community just in case.
It looks like you're new here. If you want to get involved, click one of these buttons!
|Upcoming OSR Seminars|
|Developing Minifilters||29 July 2019||OSR Seminar Space|
|Writing WDF Drivers||23 Sept 2019||OSR Seminar Space|
|Kernel Debugging||21 Oct 2019||OSR Seminar Space|
|Internals & Software Drivers||18 Nov 2019||Dulles, VA|