diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-12-13 20:02:22 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-12-14 12:03:46 +0300 |
commit | 425a5072dcd1bd895eea90a6b495392b6358ebd0 (patch) | |
tree | 312ffe3eee07e6fd1ae14732b2d67273df053548 /include/linux/irqdesc.h | |
parent | f0cb32207307e9d7b3ee8117078b7a37f8d0166e (diff) | |
download | linux-425a5072dcd1bd895eea90a6b495392b6358ebd0.tar.xz |
genirq: Free irq_desc with rcu
The new VMD device driver needs to iterate over a list of
"demultiplexing" interrupts. Protecting that list with a lock is not
possible because the list is also required in code pathes which hold
irq descriptor lock. Therefor the demultiplexing interrupt handler
would create a lock inversion scenario if it calls a demux handler
with the list protection lock held.
A solution for this is to free the irq descriptor via RCU, so the
list can be walked with rcu read lock held.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Keith Busch <keith.busch@intel.com>
Diffstat (limited to 'include/linux/irqdesc.h')
-rw-r--r-- | include/linux/irqdesc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index a587a33363c7..dcca77c4b9d2 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -1,6 +1,8 @@ #ifndef _LINUX_IRQDESC_H #define _LINUX_IRQDESC_H +#include <linux/rcupdate.h> + /* * Core internal functions to deal with irq descriptors */ @@ -40,6 +42,7 @@ struct pt_regs; * IRQF_NO_SUSPEND set * @force_resume_depth: number of irqactions on a irq descriptor with * IRQF_FORCE_RESUME set + * @rcu: rcu head for delayed free * @dir: /proc/irq/ procfs entry * @name: flow handler name for /proc/interrupts output */ @@ -82,6 +85,9 @@ struct irq_desc { #ifdef CONFIG_PROC_FS struct proc_dir_entry *dir; #endif +#ifdef CONFIG_SPARSE_IRQ + struct rcu_head rcu; +#endif int parent_irq; struct module *owner; const char *name; |