linux-stable/arch/x86
Venki Pallipadi f0ed4e695f x86: using HPET in MSI mode and setting up per CPU HPET timers, fix
On Sat, Sep 06, 2008 at 06:03:53AM -0700, Ingo Molnar wrote:
>
> it crashes two testsystems, the fault on a NULL pointer in hpet init,
> with:
>
> initcall print_all_ICs+0x0/0x520 returned 0 after 26 msecs
> calling  hpet_late_init+0x0/0x1c0
> BUG: unable to handle kernel NULL pointer dereference at 000000000000008c
> IP: [<ffffffff80d228be>] hpet_late_init+0xfe/0x1c0
> PGD 0
> Oops: 0000 [1] SMP
> CPU 0
> Modules linked in:
> Pid: 1, comm: swapper Not tainted 2.6.27-rc5 #29725
> RIP: 0010:[<ffffffff80d228be>]  [<ffffffff80d228be>] hpet_late_init+0xfe/0x1c0
> RSP: 0018:ffff88003fa07dd0  EFLAGS: 00010246
> RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000
> RDX: ffffc20000000160 RSI: 0000000000000000 RDI: 0000000000000003
> RBP: ffff88003fa07e90 R08: 0000000000000000 R09: ffff88003fa07dd0
> R10: 0000000000000001 R11: 0000000000000000 R12: ffff88003fa07dd0
> R13: 0000000000000002 R14: ffffc20000000000 R15: 000000006f57e511
> FS:  0000000000000000(0000) GS:ffffffff80cf6a80(0000) knlGS:0000000000000000
> CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
> CR2: 000000000000008c CR3: 0000000000201000 CR4: 00000000000006e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process swapper (pid: 1, threadinfo ffff88003fa06000, task ffff88003fa08000)
> Stack:  00000000fed00000 ffffc20000000000 0000000100000003 0000000800000002
>  0000000000000000 0000000000000000 0000000000000000 0000000000000000
>  0000000000000000 0000000000000000 0000000000000000 0000000000000000
> Call Trace:
>  [<ffffffff80d227c0>] ? hpet_late_init+0x0/0x1c0
>  [<ffffffff80209045>] do_one_initcall+0x45/0x190
>  [<ffffffff80296f39>] ? register_irq_proc+0x19/0xe0
>  [<ffffffff80d0d140>] ? early_idt_handler+0x0/0x73
>  [<ffffffff80d0dabc>] kernel_init+0x14c/0x1b0
>  [<ffffffff80942ac1>] ? trace_hardirqs_on_thunk+0x3a/0x3f
>  [<ffffffff8020dbd9>] child_rip+0xa/0x11
>  [<ffffffff8020ceee>] ? restore_args+0x0/0x30
>  [<ffffffff80d0d970>] ? kernel_init+0x0/0x1b0
>  [<ffffffff8020dbcf>] ? child_rip+0x0/0x11
> Code: 20 48 83 c1 01 48 39 f1 75 e3 44 89 e8 4c 8b 05 29 29 22 00 31 f6 48 8d 78 01 66 66 90 89 f0 48 8d 04 80 48 c1 e0 05 4a 8d 0c 00 <f6> 81 8c 00 00 00 08 74 26 8b 81 80 00 00 00 8b 91 88 00 00 00
> RIP  [<ffffffff80d228be>] hpet_late_init+0xfe/0x1c0
>  RSP <ffff88003fa07dd0>
> CR2: 000000000000008c
> Kernel panic - not syncing: Fatal exception

There was one code path, with CONFIG_PCI_MSI disabled, where we were accessing
hpet_devs without initialization. That resulted in the above crash. The change
below adds a check for hpet_devs.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-16 16:53:09 +02:00
..
boot Merge branches 'x86/xen', 'x86/build', 'x86/microcode', 'x86/mm-debug-v2', 'x86/memory-corruption-check', 'x86/early-printk', 'x86/xsave', 'x86/ptrace-v2', 'x86/quirks', 'x86/setup', 'x86/spinlocks' and 'x86/signal' into x86/core-v2 2008-10-12 15:50:02 +02:00
configs x86: remove irqbalance in kernel for 32 bit 2008-10-16 16:52:52 +02:00
crypto crypto: crc32c - Use Intel CRC32 instruction 2008-08-29 15:49:50 +10:00
ia32 x86-64: slightly stream-line 32-bit syscall entry code 2008-10-13 10:19:54 +02:00
kernel x86: using HPET in MSI mode and setting up per CPU HPET timers, fix 2008-10-16 16:53:09 +02:00
kvm Merge branch 'x86/unify-cpu-detect' into x86-v28-for-linus-phase4-D 2008-10-11 20:23:20 +02:00
lguest x86: make 32bit support per_cpu vector 2008-10-16 16:52:53 +02:00
lib Merge branch 'x86/unify-cpu-detect' into x86-v28-for-linus-phase4-D 2008-10-11 20:23:20 +02:00
mach-default Merge branches 'x86/prototypes', 'x86/x2apic' and 'x86/debug' into x86/core 2008-08-14 14:58:22 +02:00
mach-generic x86: make 32bit support per_cpu vector 2008-10-16 16:52:53 +02:00
mach-rdc321x removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
mach-voyager generic: sparse irqs: use irq_desc() together with dyn_array, instead of irq_desc[] 2008-10-16 16:52:29 +02:00
math-emu
mm x86: add after_bootmem flag for 32bit 2008-10-16 16:52:02 +02:00
oprofile Merge branch 'linus' into oprofile-v2 2008-10-13 11:05:51 +02:00
pci Merge branches 'oprofile-v2' and 'timers/hpet' into x86/core-v4 2008-10-13 14:18:42 +02:00
power Merge branch 'x86/unify-cpu-detect' into x86-v28-for-linus-phase4-D 2008-10-11 20:23:20 +02:00
vdso Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus 2008-07-21 16:37:17 +02:00
video
xen xen: Fix bug `do_IRQ: cannot handle IRQ -1 vector 0x6 cpu 1' 2008-10-16 16:52:58 +02:00
Kconfig x86: make HAVE_SPARSE_IRQ support selectable 2008-10-16 16:52:57 +02:00
Kconfig.cpu x86: adjust dependencies for CONFIG_X86_CMOV 2008-10-13 10:33:50 +02:00
Kconfig.debug x86: usb debug port early console, fix 2008-07-26 17:32:30 +02:00
Makefile x86, RDC321x: add to mach-default 2008-07-26 13:51:46 +02:00
Makefile_32.cpu x86: merge winchip-2 and winchip-2a cpu choices 2008-10-13 10:22:48 +02:00