Skip to content

Commit 71de40f

Browse files
kkamaguigregkh
authored andcommitted
x86/ioapic: Pass the correct data to unmask_ioapic_irq()
commit e708e35ba6d89ff785b225cd07dcccab04fa954a upstream. One of the rarely executed code pathes in check_timer() calls unmask_ioapic_irq() passing irq_get_chip_data(0) as argument. That's wrong as unmask_ioapic_irq() expects a pointer to the irq data of interrupt 0. irq_get_chip_data(0) returns NULL, so the following dereference in unmask_ioapic_irq() causes a kernel panic. The issue went unnoticed in the first place because irq_get_chip_data() returns a void pointer so the compiler cannot do a type check on the argument. The code path was added for machines with broken configuration, but it seems that those machines are either not running current kernels or simply do not longer exist. Hand in irq_get_irq_data(0) as argument which provides the correct data. [ tglx: Rewrote changelog ] Fixes: 4467715 ("x86/irq: Move irq_cfg.irq_2_pin into io_apic.c") Signed-off-by: Seunghun Han <kkamagui@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1500369644-45767-1-git-send-email-kkamagui@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fa7ddee commit 71de40f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/kernel/apic/io_apic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ static inline void __init check_timer(void)
21152115
int idx;
21162116
idx = find_irq_entry(apic1, pin1, mp_INT);
21172117
if (idx != -1 && irq_trigger(idx))
2118-
unmask_ioapic_irq(irq_get_chip_data(0));
2118+
unmask_ioapic_irq(irq_get_irq_data(0));
21192119
}
21202120
irq_domain_deactivate_irq(irq_data);
21212121
irq_domain_activate_irq(irq_data);

0 commit comments

Comments
 (0)