[4.2.y-ckt stable] Patch "x86/apic: Handle zero vector gracefully in clear_vector_irq()" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Mon May 9 19:43:48 UTC 2016
This is a note to let you know that I have just added a patch titled
x86/apic: Handle zero vector gracefully in clear_vector_irq()
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
https://git.launchpad.net/~canonical-kernel/linux/+git/linux-stable-ckt/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt10.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 810a427af6ba7a1579949b3435d4165fe1e434d3 Mon Sep 17 00:00:00 2001
From: Keith Busch <keith.busch at intel.com>
Date: Wed, 27 Apr 2016 14:22:32 -0600
Subject: x86/apic: Handle zero vector gracefully in clear_vector_irq()
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 at intel.com>
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
arch/x86/kernel/apic/vector.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 7889bec..c8a2b9c 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -226,7 +226,8 @@ static void clear_irq_vector(int irq, struct apic_chip_data *data)
{
int cpu, vector;
- BUG_ON(!data->cfg.vector);
+ if (!data->cfg.vector)
+ return;
vector = data->cfg.vector;
for_each_cpu_and(cpu, data->domain, cpu_online_mask)
--
2.7.4
More information about the kernel-team
mailing list