summaryrefslogtreecommitdiff
path: root/Kernel/VM/MemoryManager.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-21 12:26:12 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-21 15:49:34 +0100
commitd46071c08f19edca854dc7af0e1f0d0887201cb1 (patch)
tree6b4ab1909e6d372dcf97140faf76f800fa144c43 /Kernel/VM/MemoryManager.cpp
parent2a679f228e3797f2315c9406193041cd2d4e9e62 (diff)
downloadserenity-d46071c08f19edca854dc7af0e1f0d0887201cb1.zip
Kernel: Assert on page fault during IRQ
We're not equipped to deal with page faults during an IRQ handler, so add an assertion so we can immediately tell what's wrong. This is why profiling sometimes hangs the system -- walking the stack of the profiled thread causes a page fault and things fall apart.
Diffstat (limited to 'Kernel/VM/MemoryManager.cpp')
-rw-r--r--Kernel/VM/MemoryManager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp
index 5d9c8430a8..1e71e3172e 100644
--- a/Kernel/VM/MemoryManager.cpp
+++ b/Kernel/VM/MemoryManager.cpp
@@ -281,6 +281,7 @@ PageFaultResponse MemoryManager::handle_page_fault(const PageFault& fault)
{
ASSERT_INTERRUPTS_DISABLED();
ASSERT(Thread::current);
+ ASSERT(!g_in_irq);
#ifdef PAGE_FAULT_DEBUG
dbgprintf("MM: handle_page_fault(%w) at V%p\n", fault.code(), fault.vaddr().get());
#endif