crash in init_ipic_sysfs on efika
Kumar Gala
galak at kernel.crashing.org
Fri Mar 21 02:15:52 EST 2008
On Mar 17, 2008, at 2:53 PM, Olaf Hering wrote:
>
> I cant reproduce this bug on my board, but:
>
> The global primary_ipic in arch/powerpc/sysdev/ipic.c can remain
> NULL if
> ipic_init() fails. init_ipic_sysfs() will crash in that case.
>
> Something like this may fix it:
>
> Index: linux-2.6.25-rc6/arch/powerpc/sysdev/ipic.c
> ===================================================================
> --- linux-2.6.25-rc6.orig/arch/powerpc/sysdev/ipic.c
> +++ linux-2.6.25-rc6/arch/powerpc/sysdev/ipic.c
> @@ -906,7 +906,7 @@ static int __init init_ipic_sysfs(void)
> {
> int rc;
>
> - if (!primary_ipic->regs)
> + if (!primary_ipic || !primary_ipic->regs)
> return -ENODEV;
> printk(KERN_DEBUG "Registering ipic with sysfs...\n");
We should look and see if we can change init_ipic_sysfs() from a
subsys_initcall() to just getting called at the end of ipic_init().
- k
More information about the Linuxppc-dev
mailing list