]> git.baikalelectronics.ru Git - kernel.git/commit
genirq: Reject bogus threaded irq requests
authorThomas Gleixner <tglx@linutronix.de>
Thu, 19 Apr 2012 08:35:17 +0000 (10:35 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 19 Apr 2012 11:56:56 +0000 (13:56 +0200)
commit4df38d498ad64972ee3673764423aafee2fb341b
tree29ba450b43c3025c28ca9f42a81e10a0e8d9460e
parent67ec53cd168360bb93930c097fbe68ecc14cbfb9
genirq: Reject bogus threaded irq requests

Requesting a threaded interrupt without a primary handler and without
IRQF_ONESHOT set is dangerous.

The core will use the default primary handler for it, which merily
wakes the thread. For a level type interrupt this results in an
interrupt storm, because the interrupt line is reenabled after the
primary handler runs. The device has still the line asserted, which
brings us back into the primary handler.

While this works for edge type interrupts, we play it safe and reject
unconditionally because we can't say for sure which type this
interrupt really has. The type flags are unreliable as the underlying
chip implementation can override them. And we cannot assume that
developers using that interface know what they are doing.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/manage.c