Best practice to BSOD on unrecoverable device error?

Let’s say my device can notify me of an unrecoverable error which could lead to the device reading/writing to random memory addresses that don’t belong to the device. It seems tearing the driver stack down and initiating a BSOD would be one option. What’s the best practice for recovery in a situation like this?

BEST practice is generally to bugcheck the system as soon as you discover the problem.

Assuming this really can cause random corruption, what you definitely don’t want to do is ignore the problem, attempt a “recovery” … resulting in some other component crashing the system (at best) or silently suffering data corruption (at worst).

KeBugCheckEx is your friend.

Peter

Thank you kindly, sir.