Re: [PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing
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 signature.asc Description: This is a digitally signed message part ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing
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; > + Kinda unlikely that desc can be NULL here :) ~Vitaly ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing
Best regards, Maxim Uvarov. From: Maxim Uvarov Signed-off-by: Maxim Uvarov --- arch/powerpc/kernel/crash.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) 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; + if (desc->status & IRQ_INPROGRESS) desc->chip->eoi(i); ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev