From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: linux-ia64 <linux-ia64@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>,
Rusty Russell <rusty@rustycorp.com.au>,
Srivatsa Vaddagiri <vatsa@in.ibm.com>,
Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Subject: [BUGFIX] [PATH 2/2] cpu-hotplug: Releasing `workqueue_mutex' properly on CPU hot-remove
Date: Fri, 27 Oct 2006 10:49:54 +0000 [thread overview]
Message-ID: <87lkn2vxrh.wl%takeuchi_satoru@jp.fujitsu.com> (raw)
Releasing `workqueue_mutex' properly on CPU hot-remove.
_cpu_down() acquires `workqueue_mutex' on its process, but doen't release it
if __cpu_disable() fails.
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Index: linux-2.6.19-rc3/kernel/cpu.c
=================================--- linux-2.6.19-rc3.orig/kernel/cpu.c 2006-10-24 14:01:39.000000000 +0900
+++ linux-2.6.19-rc3/kernel/cpu.c 2006-10-27 19:38:14.000000000 +0900
@@ -150,18 +150,18 @@
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))
reply other threads:[~2006-10-27 10:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lkn2vxrh.wl%takeuchi_satoru@jp.fujitsu.com \
--to=takeuchi_satoru@jp.fujitsu.com \
--cc=akpm@osdl.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustycorp.com.au \
--cc=vatsa@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox