diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2011-07-11 12:17:31 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-07-28 11:23:21 +0200 |
commit | b6873807a7143b7d6d8b06809295e559d07d7deb (patch) | |
tree | 1187413ab85f1a7b7d5da91bf61ae21601da3855 /include/linux/irqdesc.h | |
parent | f3637a5f2e2eb391ff5757bc83fb5de8f9726464 (diff) |
irq: Track the owner of irq descriptor
Interrupt descriptors can be allocated from modules. The interrupts
are used by other modules, but we have no refcount on the module which
provides the interrupts and there is no way to establish one on the
device level as the interrupt using module is agnostic to the fact
that the interrupt is provided by a module rather than by some builtin
interrupt controller.
To prevent removal of the interrupt providing module, we can track the
owner of the interrupt descriptor, which also provides the relevant
irq chip functions in the irq descriptor.
request/setup_irq() can now acquire a refcount on the owner module to
prevent unloading. free_irq() drops the refcount.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Link: http://lkml.kernel.org/r/20110711101731.GA13804@Chamillionaire.breakpoint.cc
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irqdesc.h')
-rw-r--r-- | include/linux/irqdesc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 2d921b35212..150134ac709 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h @@ -66,6 +66,7 @@ struct irq_desc { #ifdef CONFIG_PROC_FS struct proc_dir_entry *dir; #endif + struct module *owner; const char *name; } ____cacheline_internodealigned_in_smp; |