From 9b970c22d240a7799de46330bc3ecb4d68b033a9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 28 Jul 2008 12:16:29 -0500 Subject: [PATCH] --- yaml --- r: 106795 b: refs/heads/master c: 04321587584272f4e8b9818f319f40caf8eeee13 h: refs/heads/master i: 106793: c0e6553bce83e8ac9d407950d2dd373215ebea24 106791: 66017ec6dd549c84a3a3d7853f970bb002e84928 v: v3 --- [refs] | 2 +- trunk/kernel/cpu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index dff8a14f3ef2..6f7e0ce328cb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ffdb5976c47609c862917d4c186ecbb5706d2dda +refs/heads/master: 04321587584272f4e8b9818f319f40caf8eeee13 diff --git a/trunk/kernel/cpu.c b/trunk/kernel/cpu.c index cf79bb911371..53cf508f975a 100644 --- a/trunk/kernel/cpu.c +++ b/trunk/kernel/cpu.c @@ -250,8 +250,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) set_cpus_allowed_ptr(current, &tmp); err = __stop_machine_run(take_cpu_down, &tcd_param, cpu); - - if (err || cpu_online(cpu)) { + if (err) { /* CPU didn't die: tell everyone. Can't complain. */ if (raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED | mod, hcpu) == NOTIFY_BAD) @@ -259,6 +258,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) goto out_allowed; } + BUG_ON(cpu_online(cpu)); /* Wait for it to sleep (leaving idle task). */ while (!idle_cpu(cpu))