[PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing
Michael Ellerman
michael at ellerman.id.au
Thu May 13 11:25:02 EST 2010
On Tue, 2010-05-11 at 18:02 +0200, Vitaly Wool wrote:
> Hi,
>
> > diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
> > index 6f4613d..341d8af 100644
> > --- a/arch/powerpc/kernel/crash.c
> > +++ b/arch/powerpc/kernel/crash.c
> > @@ -375,6 +375,9 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
> > for_each_irq(i) {
> > struct irq_desc *desc = irq_to_desc(i);
> >
> > + if (!desc || !desc->chip || !desc->chip->eoi)
> > + continue;
> > +
Actually almost certain that desc will be NULL. When CONFIG_SPARSE_IRQ=y
(the default), irq_desc's are allocated lazily.
cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20100513/c41ffb2b/attachment.pgp>
More information about the Linuxppc-dev
mailing list