dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/kernel/irq
Geert Uytterhoeven ed585a6516 genirq: Make irq_shutdown() symmetric vs. irq_startup again
If an irq_chip provides .irq_shutdown(), but neither of .irq_disable() or
.irq_mask(), free_irq() crashes when jumping to NULL.
Fix this by only trying .irq_disable() and .irq_mask() if there's no
.irq_shutdown() provided.

This revives the symmetry with irq_startup(), which tries .irq_startup(),
.irq_enable(), and irq_unmask(), and makes it consistent with the comment for
irq_chip.irq_shutdown() in <linux/irq.h>, which says:

 * @irq_shutdown:	shut down the interrupt (defaults to ->disable if NULL)

This is also how __free_irq() behaved before the big overhaul, cfr. e.g.
3b56f0585f ("genirq: Remove bogus conditional"),
where the core interrupt code always overrode .irq_shutdown() to
.irq_disable() if .irq_shutdown() was NULL.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org
Link: http://lkml.kernel.org/r/1315742394-16036-2-git-send-email-geert@linux-m68k.org
Cc: stable@kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-09-12 09:38:53 +02:00
..
Kconfig irq: add irq_domain translation infrastructure 2011-07-28 01:32:04 -06:00
Makefile irq: add irq_domain translation infrastructure 2011-07-28 01:32:04 -06:00
autoprobe.c genirq: Remove compat code 2011-03-29 14:48:19 +02:00
chip.c genirq: Make irq_shutdown() symmetric vs. irq_startup again 2011-09-12 09:38:53 +02:00
debug.h genirq: Support per-IRQ thread disabling. 2011-04-23 15:56:24 +02:00
devres.c devres: fix possible use after free 2011-07-25 20:57:14 -07:00
dummychip.c genirq: Remove compat code 2011-03-29 14:48:19 +02:00
generic-chip.c genirq: Fix wrong bit operation 2011-07-26 16:24:02 +02:00
handle.c irq: Handle spurios irq detection for threaded irqs 2011-06-03 14:53:15 +02:00
internals.h genirq: Remove compat code 2011-03-29 14:48:19 +02:00
irqdesc.c irqdesc: fix new kernel-doc warning 2011-08-18 14:12:48 -07:00
irqdomain.c dt/irq: add irq_domain_generate_simple() helper 2011-07-28 01:32:04 -06:00
manage.c Revert "irq: Always set IRQF_ONESHOT if no primary handler is specified" 2011-08-23 10:36:51 -07:00
migration.c Fix common misspellings 2011-03-31 11:26:23 -03:00
pm.c genirq: Add chip flag to force mask on suspend 2011-03-12 11:12:58 +01:00
proc.c irq: Remove smp_affinity_list when unregister irq proc 2011-05-26 13:15:28 +02:00
resend.c genirq: Remove compat code 2011-03-29 14:48:19 +02:00
settings.h genirq: Support per-IRQ thread disabling. 2011-04-23 15:56:24 +02:00
spurious.c irq: Handle spurios irq detection for threaded irqs 2011-06-03 14:53:15 +02:00