Bypass debug I/O locks during kernel panic or debugger session
This commit is contained in:
@@ -57,12 +57,16 @@ VOID
|
|||||||
KD::DebugIo::DbgPrint(PCWSTR Format,
|
KD::DebugIo::DbgPrint(PCWSTR Format,
|
||||||
VA_LIST Arguments)
|
VA_LIST Arguments)
|
||||||
{
|
{
|
||||||
PLIST_ENTRY DispatchTableEntry;
|
|
||||||
PKD_DISPATCH_TABLE DispatchTable;
|
PKD_DISPATCH_TABLE DispatchTable;
|
||||||
|
PLIST_ENTRY DispatchTableEntry;
|
||||||
|
BOOLEAN BypassLocks;
|
||||||
|
|
||||||
/* Raise runlevel and acquire the Debug I/O lock */
|
/* Evaluate if the system is currently in a critical or debugging state */
|
||||||
KE::RaiseRunLevel RunLevel(HIGH_LEVEL);
|
BypassLocks = (KE::Crash::SystemCrashed() || KD::Debugger::DebuggerActive());
|
||||||
KE::SpinLockGuard SpinLock(&DebugIoLock);
|
|
||||||
|
/* Conditionally raise runlevel and acquire the Debug I/O lock */
|
||||||
|
KE::RaiseRunLevel RunLevel(HIGH_LEVEL, !BypassLocks);
|
||||||
|
KE::SpinLockGuard SpinLock(&DebugIoLock, !BypassLocks);
|
||||||
|
|
||||||
/* Iterate over all registered debug providers */
|
/* Iterate over all registered debug providers */
|
||||||
DispatchTableEntry = Providers.Flink;
|
DispatchTableEntry = Providers.Flink;
|
||||||
|
|||||||
Reference in New Issue
Block a user