* [PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing
@ 2010-05-11 15:41 Maxim Uvarov
2010-05-11 16:02 ` Vitaly Wool
0 siblings, 1 reply; 3+ messages in thread
From: Maxim Uvarov @ 2010-05-11 15:41 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel, uvarov
Best regards,
Maxim Uvarov.
From: Maxim Uvarov <muvarov@gmail.com>
Signed-off-by: Maxim Uvarov <muvarov@gmail.com>
---
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing
2010-05-11 15:41 [PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing Maxim Uvarov
@ 2010-05-11 16:02 ` Vitaly Wool
2010-05-13 1:25 ` Michael Ellerman
0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Wool @ 2010-05-11 16:02 UTC (permalink / raw)
To: Maxim Uvarov; +Cc: uvarov, linuxppc-dev, linux-kernel
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 *r=
egs)
> =A0 =A0 =A0 =A0for_each_irq(i) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct irq_desc *desc =3D irq_to_desc(i);
>
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (!desc || !desc->chip || !desc->chip->eo=
i)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 continue;
> +
Kinda unlikely that desc can be NULL here :)
~Vitaly
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing
2010-05-11 16:02 ` Vitaly Wool
@ 2010-05-13 1:25 ` Michael Ellerman
0 siblings, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2010-05-13 1:25 UTC (permalink / raw)
To: Vitaly Wool; +Cc: Maxim Uvarov, uvarov, linuxppc-dev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 681 bytes --]
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
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-13 1:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-11 15:41 [PATCH] [POWEPC] crashdump: do not fail on null pointer dereferencing Maxim Uvarov
2010-05-11 16:02 ` Vitaly Wool
2010-05-13 1:25 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).