From: Keith Owens <kaos@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [patch] 2.6.5 BUG if smp_call_function is called with interrupts disabled
Date: Tue, 27 Apr 2004 01:32:10 +0000 [thread overview]
Message-ID: <1551.1083029530@kao2.melbourne.sgi.com> (raw)
In-Reply-To: <9348.1083024579@ocs3.ocs.com.au>
Take 3.
There is a nasty race if smp_call_function() is called with interrupts
disabled.
CPU A CPU B
Disable interrupts
smp_call_function()
Take call_lock
Send IPIs
Wait for all cpus to acknowledge IPI
CPU A has not responded, spin waiting
for cpu A to respond, holding call_lock
smp_call_function()
Spin waiting for call_lock
Deadlock Deadlock
This bug is hard to reproduce and even harder to diagnose. Since the
comments at the start of smp_call_function() say it should never be
entered with interrupts disabled, make it so.
Index: linux/arch/ia64/kernel/smp.c
=================================--- linux.orig/arch/ia64/kernel/smp.c Mon Apr 26 15:20:17 2004
+++ linux/arch/ia64/kernel/smp.c Tue Apr 27 11:30:48 2004
@@ -323,6 +323,8 @@
if (!cpus)
return 0;
+ BUG_ON(irqs_disabled());
+
data.func = func;
data.info = info;
atomic_set(&data.started, 0);
prev parent reply other threads:[~2004-04-27 1:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-27 0:09 [patch] 2.6.5 BUG if smp_call_function is called with interrupts disabled Keith Owens
2004-04-27 0:31 ` David Mosberger
2004-04-27 0:43 ` Keith Owens
2004-04-27 0:54 ` David Mosberger
2004-04-27 1:32 ` Keith Owens [this message]
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=1551.1083029530@kao2.melbourne.sgi.com \
--to=kaos@sgi.com \
--cc=linux-ia64@vger.kernel.org \
/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