aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cpu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3945066..cb7a1ef 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -249,8 +249,11 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
* The migration_call() CPU_DYING callback will have removed all
* runnable tasks from the cpu, there's only the idle task left now
* that the migration thread is done doing the stop_machine thing.
+ *
+ * Wait for the stop thread to go away.
*/
- BUG_ON(!idle_cpu(cpu));
+ while (!idle_cpu(cpu))
+ cpu_relax();
/* This actually kills the CPU. */
__cpu_die(cpu);