summaryrefslogtreecommitdiffstats
path: root/kernel/stop_machine.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/stop_machine.c')
-rw-r--r--kernel/stop_machine.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index e190d1ef3a23..69eb76daed34 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -81,6 +81,7 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
81 unsigned long flags; 81 unsigned long flags;
82 bool enabled; 82 bool enabled;
83 83
84 preempt_disable();
84 raw_spin_lock_irqsave(&stopper->lock, flags); 85 raw_spin_lock_irqsave(&stopper->lock, flags);
85 enabled = stopper->enabled; 86 enabled = stopper->enabled;
86 if (enabled) 87 if (enabled)
@@ -90,6 +91,7 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
90 raw_spin_unlock_irqrestore(&stopper->lock, flags); 91 raw_spin_unlock_irqrestore(&stopper->lock, flags);
91 92
92 wake_up_q(&wakeq); 93 wake_up_q(&wakeq);
94 preempt_enable();
93 95
94 return enabled; 96 return enabled;
95} 97}