Message ID | 20190321234412.11113-5-mfo@canonical.com |
---|---|
State | New |
Headers | show |
Series | LP#1821259 Fix for deadlock in cpu_stopper | expand |
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 7f39951f30bc..7f5579fc44ab 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -89,6 +89,7 @@ static void cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work) WAKE_Q(wakeq); unsigned long flags; + preempt_disable(); spin_lock_irqsave(&stopper->lock, flags); if (stopper->enabled) __cpu_stop_queue_work(stopper, work, &wakeq); @@ -97,6 +98,7 @@ static void cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work) spin_unlock_irqrestore(&stopper->lock, flags); wake_up_q(&wakeq); + preempt_enable(); } /**