mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user