From: Andrew Morton <akpm@linux-foundation.org>
To: Laurent Vivier <Laurent.Vivier@bull.net>
Cc: Fengguang Wu <wfg@mail.ustc.edu.cn>, Andi Kleen <ak@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: WARNING: at arch/x86_64/kernel/smp.c:397 smp_call_function_mask()
Date: Fri, 28 Sep 2007 02:34:22 -0700 [thread overview]
Message-ID: <20070928023422.77be1e71.akpm@linux-foundation.org> (raw)
In-Reply-To: <46FCC6F5.2030109@bull.net>
On Fri, 28 Sep 2007 11:18:45 +0200 Laurent Vivier <Laurent.Vivier@bull.net> wrote:
> Andrew Morton wrote:
> > On Fri, 28 Sep 2007 10:52:08 +0200 Laurent Vivier <Laurent.Vivier@bull.net> wrote:
> >>
> >> Andi, is this correct ?
> >> Andrew, should I send a patch implementing this change ?
> >
> > umm, I think all the smp_call_function fucntions are deadlocky if called
> > with local interrupts disabled, regardless of whether the calling CPU is in
> > the mask.
> >
> > If CPU A is sending a cross-cpu call to CPU B and CPU B is sending a
> > cross-cpu call to CPU A, and they both have local interrupts disabled...
>
> OK, so there are two errors:
>
> 1- one I introduce myself (without any help from anyone) where
> smp_call_function() calls all online CPUs instead of calling all CPUs except itself.
I'd be pretty surprised if one was able to write a bug like that. You mean
the CPU sends an IPI to itself and then loops around until it has serviced
that IPI? And this works? Wow.
And on_each_cpu() can call the handler function twice?
hm
> 2- one in global_flush_tlb() which calls smp_call_function() with irqs disabled.
That would be a big bug, and surely we would already have picked it up.
<looks>
argh, mainline's x86_64 smp_call_function() doesn't do the check. We've
had *heaps* of bugs in i386 where people were running smp_call_foo() under
local_irq_disable(). I wonder how many there are in x86_64?
> I think I should at least correct #1 ?
I think we should correct all bugs ;)
next prev parent reply other threads:[~2007-09-28 9:35 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 9:22 2.6.23-rc8-mm2 Andrew Morton
2007-09-27 10:52 ` 2.6.23-rc8-mm2 - drivers/net/ibm_newemac/mal - broken Kamalesh Babulal
2007-09-27 15:19 ` 2.6.23-rc8-mm2: problems on HP nx6325 Rafael J. Wysocki
2007-09-27 15:59 ` Rafael J. Wysocki
2007-09-27 15:49 ` Thomas Gleixner
2007-09-28 21:31 ` Rafael J. Wysocki
2007-09-27 16:53 ` Sam Ravnborg
2007-09-27 17:33 ` Randy Dunlap
2007-09-27 19:19 ` Sam Ravnborg
2007-09-27 19:48 ` Rafael J. Wysocki
2007-09-27 19:37 ` Randy Dunlap
2007-09-27 20:01 ` Rafael J. Wysocki
2007-09-27 19:18 ` 2.6.23-rc8-mm2: BUG near reiserfs_xattr_set Laurent Riffard
2007-09-27 19:48 ` Andrew Morton
2007-09-27 19:48 ` Andrew Morton
2007-09-27 20:05 ` Dave Hansen
2007-09-27 20:26 ` Christoph Hellwig
2007-09-27 20:53 ` [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations Dave Hansen
2007-09-27 21:04 ` Christoph Hellwig
2007-09-27 21:27 ` Dave Hansen
2007-09-27 21:51 ` Andrew Morton
2007-09-27 21:54 ` Andrew Morton
2007-09-27 22:02 ` Peter Zijlstra
2007-09-28 7:16 ` Christoph Hellwig
2007-09-28 7:29 ` [RFC][PATCH] stop abusing filp_open in reiserfs journal code Christoph Hellwig
2007-09-28 7:29 ` Christoph Hellwig
2007-09-28 7:29 ` Christoph Hellwig
2007-09-28 2:40 ` WARNING: at arch/x86_64/kernel/smp.c:397 smp_call_function_mask() Fengguang Wu
2007-09-28 2:40 ` Fengguang Wu
2007-09-28 8:52 ` Laurent Vivier
2007-09-28 9:09 ` Andrew Morton
2007-09-28 9:18 ` Laurent Vivier
2007-09-28 9:34 ` Andrew Morton [this message]
2007-09-28 12:07 ` Laurent Vivier
2007-09-29 6:59 ` Fengguang Wu
2007-09-29 6:59 ` Fengguang Wu
2007-09-29 8:15 ` Fengguang Wu
2007-09-29 8:15 ` Fengguang Wu
2007-10-02 9:11 ` [PATCH][RESEND] call free_init_pages() with irqs enabled in alternative_instructions() Fengguang Wu
2007-10-02 9:11 ` Fengguang Wu
2007-09-28 15:42 ` 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING Cedric Le Goater
2007-09-28 19:10 ` Ilpo Järvinen
2007-09-29 12:44 ` Ilpo Järvinen
2007-09-29 14:55 ` Cedric Le Goater
2007-09-29 20:49 ` Ilpo Järvinen
2007-10-01 9:26 ` Cedric Le Goater
2007-10-02 10:26 ` Ilpo Järvinen
2007-10-02 20:06 ` Ilpo Järvinen
2007-10-02 21:48 ` Ilpo Järvinen
2007-09-28 16:30 ` /proc/net/ bad hard links count [Was: 2.6.23-rc8-mm2] Jiri Slaby
2007-09-28 17:03 ` Eric W. Biederman
2007-09-29 9:37 ` 2.6.23-rc8-mm2 Dave Young
2007-09-29 15:19 ` 2.6.23-rc8-mm2 Greg KH
2007-09-30 1:29 ` 2.6.23-rc8-mm2 Dave Young
2007-09-30 5:18 ` 2.6.23-rc8-mm2 thunder7
2007-10-08 6:43 ` 2.6.23-rc8-mm2 Dave Young
2007-09-30 2:26 ` 2.6.23-rc8-mm2 Valdis.Kletnieks
2007-09-30 8:50 ` 2.6.23-rc8-mm2 Andrew Morton
2007-09-30 20:01 ` 2.6.23-rc8-mm2 Rafael J. Wysocki
2007-10-01 17:12 ` 2.6.23-rc8-mm2 Valdis.Kletnieks
2007-10-01 16:12 ` 2.6.23-rc8-mm2 Valdis.Kletnieks
2007-09-30 4:10 ` 2.6.23-rc8-mm2 - PowerPC link failure at arch/powerpc/kernel/head_64.o Kamalesh Babulal
2007-09-30 9:37 ` Kamalesh Babulal
2007-09-30 9:37 ` Kamalesh Babulal
2007-10-09 17:49 ` 2.6.23-rc8-mm2 Matt Mackall
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=20070928023422.77be1e71.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Laurent.Vivier@bull.net \
--cc=ak@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=wfg@mail.ustc.edu.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.