Re: [BUG] next-20081216 - WARNING: at kernel/smp.c:333 smp_call_function_mask

Yinghai Lu
2008-12-23T21:12:42Z

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

Kamalesh Babulal wrote:
> * Yinghai Lu <yinghai@kernel.org> [2008-12-19 13:02:40]:
>
>
> I tried testing with today's tip/master and it can be reproduced with it.
>
> root (hd0,0)
> Filesystem type is ext2fs, partition type 0x83
> kernel /vmlinuz-autotest root=/dev/mapper/VolGroup00-LogVol00 ro console=tty0 c
> onsole=ttyS1,19200 selinux=no debug nmi_watchdog=1 unknown_nmi_panic=1 initcall
> _debug earlyprintk=serial,ttyS1,19200 IDENT=1230036460
> [Linux-bzImage, setup=0x3000, size=0x273c10]
> initrd /initrd-autotest
> [Linux-initrd @ 0x37e5f000, 0x190980 bytes]
>
> Linux version 2.6.28-rc8-autotest-tip (root@bl6-13.ltc.austin.ibm.com) (gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)) #1 SMP Tue Dec 23 06:37:41 CST 2008
> Command line: root=/dev/mapper/VolGroup00-LogVol00 ro console=tty0 console=ttyS1,19200 selinux=no debug nmi_watchdog=1 unknown_nmi_panic=1 initcall_debug earlyprintk=serial,ttyS1,19200 IDENT=1230036460
> Built 1 zonelists in Node order, mobility grouping on. Total pages: 256240
> Policy zone: DMA32
> Kernel command line: root=/dev/mapper/VolGroup00-LogVol00 ro console=tty0 console=ttyS1,19200 selinux=no debug nmi_watchdog=1 unknown_nmi_panic=1 initcall_debug earlyprintk=serial,ttyS1,19200 IDENT=1230036460
> Initializing CPU#0
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
> IP: [<ffffffff8070e46a>] init_ISA_irqs+0x18/0x53
> PGD 0

please try attached debug patch.

Thanks

YH

[-- Attachment #2: sparse_irq_fix1.patch --]
[-- Type: text/x-patch, Size: 1610 bytes --]

diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 3e070bb..41b29cf 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -180,6 +180,9 @@ void __init arch_early_irq_init(void)
cfg = irq_cfgx;
count = ARRAY_SIZE(irq_cfgx);

+ printk(KERN_DEBUG
+ "calling arch_early_irq_init with count=%d\n", count);
+
for (i = 0; i < count; i++) {
desc = irq_to_desc(i);
desc->chip_data = &cfg[i];
diff --git a/init/main.c b/init/main.c
index f10a499..dadff40 100644
--- a/init/main.c
+++ b/init/main.c
@@ -544,10 +544,12 @@ void __init __weak thread_info_cache_init(void)

void __init __weak arch_early_irq_init(void)
{
+ printk(KERN_DEBUG "calling __weak arch_early_irq_init\n");
}

void __init __weak early_irq_init(void)
{
+ printk(KERN_DEBUG "calling __weak early_irq_init\n");
arch_early_irq_init();
}

diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 6492400..c7f4404 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -56,10 +56,6 @@ void handle_bad_irq(unsigned int irq, struct irq_desc *desc)
int nr_irqs = NR_IRQS;
EXPORT_SYMBOL_GPL(nr_irqs);

-void __init __attribute__((weak)) arch_early_irq_init(void)
-{
-}
-
#ifdef CONFIG_SPARSE_IRQ
static struct irq_desc irq_desc_init = {
.irq = -1,
@@ -143,6 +139,9 @@ void __init early_irq_init(void)
desc = irq_desc_legacy;
legacy_count = ARRAY_SIZE(irq_desc_legacy);

+ printk(KERN_DEBUG
+ "calling early_irq_init with legacy_count=%d\n", legacy_count);
+
for (i = 0; i < legacy_count; i++) {
desc[i].irq = i;
desc[i].kstat_irqs = kstat_irqs_legacy[i];