Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299703 > unrolled thread

[patch 02/14] x86/irq: Validate that irq descriptor is still active

Started byThomas Gleixner <tglx@linutronix.de>
First post2015-12-31 17:40 +0100
Last post2015-12-31 17:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [patch 02/14] x86/irq: Validate that irq descriptor is still active Thomas Gleixner <tglx@linutronix.de> - 2015-12-31 17:40 +0100

#1299703 — [patch 02/14] x86/irq: Validate that irq descriptor is still active

FromThomas Gleixner <tglx@linutronix.de>
Date2015-12-31 17:40 +0100
Subject[patch 02/14] x86/irq: Validate that irq descriptor is still active
Message-ID<qLOqD-6NB-39@gated-at.bofh.it>
In fixup_irqs() we unconditionally dereference the irq chip of an irq
descriptor. The descriptor might still be valid, but already cleaned up,
i.e. the chip removed. Add a check for this condition.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/irq.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -470,6 +470,15 @@ void fixup_irqs(void)
 		}
 
 		chip = irq_data_get_irq_chip(data);
+		/*
+		 * The interrupt descriptor might have been cleaned up
+		 * already, but it is not yet removed from the radix tree
+		 */
+		if (!chip) {
+			raw_spin_unlock(&desc->lock);
+			continue;
+		}
+
 		if (!irqd_can_move_in_process_context(data) && chip->irq_mask)
 			chip->irq_mask(data);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web