From b152c686b9a65ef87292a3835cbbb63621429a25 Mon Sep 17 00:00:00 2001 From: Satoru Takeuchi Date: Sat, 28 Oct 2006 10:38:57 -0700 Subject: [PATCH] --- yaml --- r: 40418 b: refs/heads/master c: 8fa1d7d3b2c51594c0f3aa151983dd51f605e07d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/cpu.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 5c59a4ae2823..63428ab6e887 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bb1d860551c4307b1a7ee9a21b120319075e987e +refs/heads/master: 8fa1d7d3b2c51594c0f3aa151983dd51f605e07d diff --git a/trunk/kernel/cpu.c b/trunk/kernel/cpu.c index 27dd3ee47099..663c920b2234 100644 --- a/trunk/kernel/cpu.c +++ b/trunk/kernel/cpu.c @@ -150,18 +150,18 @@ static int _cpu_down(unsigned int cpu) p = __stop_machine_run(take_cpu_down, NULL, cpu); mutex_unlock(&cpu_bitmask_lock); - if (IS_ERR(p)) { + if (IS_ERR(p) || cpu_online(cpu)) { /* CPU didn't die: tell everyone. Can't complain. */ if (raw_notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED, (void *)(long)cpu) == NOTIFY_BAD) BUG(); - err = PTR_ERR(p); - goto out_allowed; - } - - if (cpu_online(cpu)) + if (IS_ERR(p)) { + err = PTR_ERR(p); + goto out_allowed; + } goto out_thread; + } /* Wait for it to sleep (leaving idle task). */ while (!idle_cpu(cpu))