From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Rusty Russell" <rusty@rustcorp.com.au>,
"Adrian Bunk" <bunk@kernel.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Mike Travis" <travis@sgi.com>,
"Srivatsa Vaddagiri" <vatsa@in.ibm.com>,
linux-kernel@vger.kernel.org, "Gautham R Shenoy" <ego@in.ibm.com>,
"Zhang, Yanmin" <yanmin.zhang@intel.com>,
"Heiko Carstens" <heiko.carstens@de.ibm.com>
Subject: Re: v2.6.26-rc7: BUG: unable to handle kernel NULL pointer dereference
Date: Tue, 24 Jun 2008 09:40:37 +0200 [thread overview]
Message-ID: <19f34abd0806240040xebb1c0fy52133a729cf1a1aa@mail.gmail.com> (raw)
In-Reply-To: <200806241136.52430.rusty@rustcorp.com.au>
On Tue, Jun 24, 2008 at 3:36 AM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> Vegard's analysis is flawed: just because cpu is offline, it still must be <
> nr_cpu_ids, which is based on possible cpus. Unless something crazy is
> happening, but a quick grep doesn't reveal anyone manipulating nr_cpu_ids.
Hm, you are right and I was wrong. I'm sorry, it just seemed too
obvious to be any other way, and I made some assumptions about
nr_cpu_ids. (IIRC, nr_node_ids changes dynamically as nodes are
added/removed, so I assumed it was the same for CPUs.)
This doesn't change the fact that get_cpu_sysdev(cpu) returns NULL,
however. This variable, the per-cpu cpu_sys_device, is only ever
changed in two places, register_cpu() and unregister_cpu(); in
register_cpu(), it is set to
per_cpu(cpu_sys_devices, num) = &cpu->sysdev;,
and in unregister_cpu(), it is set to
per_cpu(cpu_sys_devices, logical_cpu) = NULL;.
So it seems *likely* that register_cpu() was never called (after the
previous unregister_cpu(), which we know happened successfully).
register_cpu() is called from arch_register_cpu(), which is called
from toplogy_init() and acpi_processor_hotadd_init(). Now, the
topology_init() call-chain is uninteresting, since it only happens at
boot. The question is whether acpi_processor_hotadd_init() will be
called if the arch-specific __cpu_up() fails...
But I am not able to follow that code.
Thanks for looking at this.
Vegard
PS: I'll withdraw the statement that this is probably a regression. It
seems more likely that nobody ever hit the "cpu failed to init" case
before.
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
next prev parent reply other threads:[~2008-06-24 7:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-22 12:56 Vegard Nossum
2008-06-22 14:47 ` Vegard Nossum
2008-06-22 14:54 ` Vegard Nossum
2008-06-22 15:56 ` Adrian Bunk
2008-06-22 16:29 ` Vegard Nossum
2008-06-23 3:26 ` Rusty Russell
2008-06-23 16:58 ` Mike Travis
2008-06-24 1:36 ` Rusty Russell
2008-06-24 7:40 ` Vegard Nossum [this message]
2008-06-24 8:06 ` Zhang, Yanmin
2008-06-24 8:37 ` Vegard Nossum
2008-06-24 13:14 ` Rusty Russell
2008-06-24 14:44 ` Mike Travis
2008-06-25 5:38 ` Rusty Russell
2008-06-25 15:06 ` Mike Travis
2008-06-26 12:58 ` Gautham R Shenoy
2008-06-27 3:16 ` Rusty Russell
2008-06-30 11:19 ` Ingo Molnar
2008-06-26 0:59 ` Zhang, Yanmin
2008-06-26 2:15 ` Andrew Morton
2008-06-26 9:00 ` Vegard Nossum
2008-06-26 12:40 ` Jason Wessel
2008-06-26 13:59 ` Vegard Nossum
2008-07-10 19:10 ` Vegard Nossum
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=19f34abd0806240040xebb1c0fy52133a729cf1a1aa@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=bunk@kernel.org \
--cc=ego@in.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=rusty@rustcorp.com.au \
--cc=travis@sgi.com \
--cc=vatsa@in.ibm.com \
--cc=yanmin.zhang@intel.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
all inboxes | Powered by JetHome®