diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-18 00:12:52 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-18 00:13:06 +0200 |
commit | 1a801e5737fa8851a367040d67267c53ba01c82c (patch) | |
tree | 1a9c7206880041d32751a3d95eacdce8c4e58bc8 /Kernel/i386.cpp | |
parent | 56c1f9db8e5e1f289858632acd3e84f419d6b267 (diff) | |
download | serenity-1a801e5737fa8851a367040d67267c53ba01c82c.zip |
Hang if we GPF in ring 0.
Diffstat (limited to 'Kernel/i386.cpp')
-rw-r--r-- | Kernel/i386.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Kernel/i386.cpp b/Kernel/i386.cpp index 47f156772a..6e7368fab0 100644 --- a/Kernel/i386.cpp +++ b/Kernel/i386.cpp @@ -79,6 +79,11 @@ void exception_13_handler() kprintf("eax=%x ebx=%x ecx=%x edx=%x\n", regs.eax, regs.ebx, regs.ecx, regs.edx); kprintf("ebp=%x esp=%x esi=%x edi=%x\n", regs.ebp, regs.esp, regs.esi, regs.edi); + if (current->isRing0()) { + kprintf("Oh shit, we've crashed in ring 0 :(\n"); + HANG; + } + current->setState(Task::Crashing); if (!scheduleNewTask()) { kprintf("Failed to schedule a new task :(\n"); |