Browse Source

Kernel: Log instead of crashing when getting a page fault during IRQ

This is definitely a bug, but it seems to happen randomly every now
and then and we need more info to track it down, so let's log for now.
Andreas Kling 5 years ago
parent
commit
b298c01e92
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Kernel/VM/MemoryManager.cpp

+ 2 - 1
Kernel/VM/MemoryManager.cpp

@@ -296,7 +296,8 @@ PageFaultResponse MemoryManager::handle_page_fault(const PageFault& fault)
 {
     ASSERT_INTERRUPTS_DISABLED();
     ASSERT(Thread::current);
-    ASSERT(!g_in_irq);
+    if (g_in_irq)
+        dbg() << "BUG! Page fault while handling IRQ! code=" << fault.code() << ", vaddr=" << fault.vaddr();
 #ifdef PAGE_FAULT_DEBUG
     dbgprintf("MM: handle_page_fault(%w) at V%p\n", fault.code(), fault.vaddr().get());
 #endif