Re: [crash] BUG: unable to handle kernel NULL pointer dereferenceat (null), last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/local_cpus

From: Jesse Barnes
Date: Fri Sep 18 2009 - 13:10:23 EST


On Fri, 18 Sep 2009 09:51:01 -0700 (PDT)
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

>
>
> On Fri, 18 Sep 2009, Yinghai Lu wrote:
> >
> > exposed by Jesse's patch too.
> >
> > please check
> >
> > ---
> > arch/x86/include/asm/pci.h | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > Index: linux-2.6/arch/x86/include/asm/pci.h
> > ===================================================================
> > --- linux-2.6.orig/arch/x86/include/asm/pci.h
> > +++ linux-2.6/arch/x86/include/asm/pci.h
> > @@ -143,7 +143,14 @@ static inline int __pcibus_to_node(const
> > static inline const struct cpumask *
> > cpumask_of_pcibus(const struct pci_bus *bus)
> > {
> > - return cpumask_of_node(__pcibus_to_node(bus));
> > + int node;
> > +
> > + node = __pcibus_to_node(bus);
> > +
> > + if (node == -1)
> > + node = numa_node_id();
> > +
> > + return cpumask_of_node(node);
>
> This looks like the wrong fix. Why would the pcibus cpumask depend on
> the node we happen to run on right now? All the other code says "no
> node means all online cpus", which makes much more sense.

Yeah, the fix I applied has the latter logic.

--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/