]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/apic: Handle zero vector gracefully in clear_vector_irq()
authorKeith Busch <keith.busch@intel.com>
Wed, 27 Apr 2016 20:22:32 +0000 (14:22 -0600)
committerKamal Mostafa <kamal@canonical.com>
Mon, 16 May 2016 17:26:27 +0000 (10:26 -0700)
commit1993b288b86d732b19d60cbf781394456405551a
treedec82d6a88612072f4d1dbb43038cf52c3bed008
parent55238830ca420156e4fd6b2eea676690d7466cc1
x86/apic: Handle zero vector gracefully in clear_vector_irq()

BugLink: http://bugs.launchpad.net/bugs/1578798
commit 1bdb8970392a68489b469c3a330a1adb5ef61beb upstream.

If x86_vector_alloc_irq() fails x86_vector_free_irqs() is invoked to cleanup
the already allocated vectors. This subsequently calls clear_vector_irq().

The failed irq has no vector assigned, which triggers the BUG_ON(!vector) in
clear_vector_irq().

We cannot suppress the call to x86_vector_free_irqs() for the failed
interrupt, because the other data related to this irq must be cleaned up as
well. So calling clear_vector_irq() with vector == 0 is legitimate.

Remove the BUG_ON and return if vector is zero,

[ tglx: Massaged changelog ]

Fixes: b5dc8e6c21e7 "x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors"
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
arch/x86/kernel/apic/vector.c