linux-sg2042/arch/x86/kernel/apic
Thomas Gleixner 45d55e7bac x86/apic/vector: Fix off by one in error path
Keith reported the following warning:

WARNING: CPU: 28 PID: 1420 at kernel/irq/matrix.c:222 irq_matrix_remove_managed+0x10f/0x120
  x86_vector_free_irqs+0xa1/0x180
  x86_vector_alloc_irqs+0x1e4/0x3a0
  msi_domain_alloc+0x62/0x130

The reason for this is that if the vector allocation fails the error
handling code tries to free the failed vector as well, which causes the
above imbalance warning to trigger.

Adjust the error path to handle this correctly.

Fixes: b5dc8e6c21 ("x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors")
Reported-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Keith Busch <keith.busch@intel.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/alpine.DEB.2.20.1801161217300.1823@nanos
2018-01-17 12:11:36 +01:00
..
Makefile x86/PCI: Remove unused HyperTransport interrupt support 2017-11-23 20:18:18 +01:00
apic.c Revert "x86/apic: Remove init_bsp_APIC()" 2018-01-14 12:14:51 +01:00
apic_common.c x86/apic: Remove unused callbacks 2017-09-25 20:51:58 +02:00
apic_flat_64.c x86/apic: Switch all APICs to Fixed delivery mode 2017-12-29 14:20:48 +01:00
apic_noop.c x86/apic: Switch all APICs to Fixed delivery mode 2017-12-29 14:20:48 +01:00
apic_numachip.c x86/apic: Remove unused callbacks 2017-09-25 20:51:58 +02:00
bigsmp_32.c Merge branch 'linus' into x86/apic, to resolve conflicts 2017-11-07 10:51:10 +01:00
hw_nmi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io_apic.c genirq/irqdomain: Rename early argument of irq_domain_activate_irq() 2017-12-29 21:13:04 +01:00
ipi.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
msi.c x86/apic: Switch all APICs to Fixed delivery mode 2017-12-29 14:20:48 +01:00
probe_32.c x86/apic: Switch all APICs to Fixed delivery mode 2017-12-29 14:20:48 +01:00
probe_64.c x86/apic: Remove duplicated include from probe_64.c 2016-07-19 16:02:31 +02:00
vector.c x86/apic/vector: Fix off by one in error path 2018-01-17 12:11:36 +01:00
x2apic.h x86/apic: Sanitize return value of apic.set_apic_id() 2017-09-25 20:51:48 +02:00
x2apic_cluster.c x86/apic: Switch all APICs to Fixed delivery mode 2017-12-29 14:20:48 +01:00
x2apic_phys.c Merge branch 'linus' into x86/apic, to resolve conflicts 2017-11-07 10:51:10 +01:00
x2apic_uv_x.c Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 19:07:38 -08:00