mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:55:08 +00:00
Kernel: Convert Processor::in_irq() to static current_in_irq()
This closes the race window between Processor::current() and a context switch happening before in_irq().
This commit is contained in:
parent
3e3f760808
commit
d60635cb9d
14 changed files with 37 additions and 39 deletions
|
@ -685,9 +685,9 @@ Region* MemoryManager::find_region_from_vaddr(VirtualAddress vaddr)
|
|||
PageFaultResponse MemoryManager::handle_page_fault(PageFault const& fault)
|
||||
{
|
||||
VERIFY_INTERRUPTS_DISABLED();
|
||||
if (Processor::current().in_irq()) {
|
||||
if (Processor::current_in_irq()) {
|
||||
dbgln("CPU[{}] BUG! Page fault while handling IRQ! code={}, vaddr={}, irq level: {}",
|
||||
Processor::id(), fault.code(), fault.vaddr(), Processor::current().in_irq());
|
||||
Processor::id(), fault.code(), fault.vaddr(), Processor::current_in_irq());
|
||||
dump_kernel_regions();
|
||||
return PageFaultResponse::ShouldCrash;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue