There is a function xyz() which is called from many places in the driver, also the same function is invoked from the BugCheck callback function.
Scenario A:
- If the bugcheck happens by invoking .crash from the debugger.
All is good. Which means the WdfDpcEnqueue() enqueues a dpc(of course which never never gets called) and the bugcheck call back continues.
Scenario B:
But, if the bugcheck is caused using NotMyFault application(from Sysinternals) then as soon as WdfDpcEnqueue() is executed the system reboots.(The bugcheck callback isn’t completed)
I am not able to understand the difference between scenario A & B for this different behavior.
Also, WdfDpcEnqueue() can be called at any IRQ Level, but why the system rebooted when WdfDpcEnqueue() is executed ?
Check the validity if the DPC(parameter of WdfDpcEnqueue()) and it’s valid.