]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
x86/ioapic: Pass the correct data to unmask_ioapic_irq()
authorSeunghun Han <kkamagui@gmail.com>
Tue, 18 Jul 2017 09:20:44 +0000 (18:20 +0900)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 11 Aug 2017 10:37:47 +0000 (12:37 +0200)
commit05619206c53c3fd7af5913f108ada9f9504cc49e
treeca32435416763e630683ce13d70eaa222150bad4
parent36f4bfa6b83c39f6342a28004e39f6d9928a7ba9
x86/ioapic: Pass the correct data to unmask_ioapic_irq()

BugLink: http://bugs.launchpad.net/bugs/1707233
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: 4467715a44cc ("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>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/x86/kernel/apic/io_apic.c