diff --git a/Kernel/Arch/i386/CPU.cpp b/Kernel/Arch/i386/CPU.cpp index 7bffaf6f5d..73a9e50174 100644 --- a/Kernel/Arch/i386/CPU.cpp +++ b/Kernel/Arch/i386/CPU.cpp @@ -1870,6 +1870,12 @@ void Processor::smp_broadcast_message(ProcessorMessage& msg, bool async) // to the pool. Otherwise, the last processor to complete it will return it while (atomic_load(&msg.refs, AK::MemoryOrder::memory_order_consume) != 0) { // TODO: pause for a bit? + + // We need to check here if another processor may have requested + // us to halt before this message could be delivered. Otherwise + // we're just spinning the CPU because msg.refs will never drop to 0. + if (cur_proc.m_halt_requested) + halt_this(); } smp_cleanup_message(msg);