aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index cf79bb91137..53cf508f975 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -250,8 +250,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
250 set_cpus_allowed_ptr(current, &tmp); 250 set_cpus_allowed_ptr(current, &tmp);
251 251
252 err = __stop_machine_run(take_cpu_down, &tcd_param, cpu); 252 err = __stop_machine_run(take_cpu_down, &tcd_param, cpu);
253 253 if (err) {
254 if (err || cpu_online(cpu)) {
255 /* CPU didn't die: tell everyone. Can't complain. */ 254 /* CPU didn't die: tell everyone. Can't complain. */
256 if (raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED | mod, 255 if (raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED | mod,
257 hcpu) == NOTIFY_BAD) 256 hcpu) == NOTIFY_BAD)
@@ -259,6 +258,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
259 258
260 goto out_allowed; 259 goto out_allowed;
261 } 260 }
261 BUG_ON(cpu_online(cpu));
262 262
263 /* Wait for it to sleep (leaving idle task). */ 263 /* Wait for it to sleep (leaving idle task). */
264 while (!idle_cpu(cpu)) 264 while (!idle_cpu(cpu))