]> git.baikalelectronics.ru Git - 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)
committerIngo Molnar <mingo@kernel.org>
Thu, 20 Jul 2017 08:28:10 +0000 (10:28 +0200)
commite906f743abe713b67e4f39800469699d1da56031
treee1c6eea02f4a8a1962b73496c8da5dbc9015d789
parente259919c40ea182b3e2b35c3d4f4a5efa7b197c5
x86/ioapic: Pass the correct data to unmask_ioapic_irq()

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: 943e15e936c0 ("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>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1500369644-45767-1-git-send-email-kkamagui@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/apic/io_apic.c