]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
genirq: Clear action->thread_mask if IRQ_ONESHOT is not set
authorThomas Gleixner <tglx@linutronix.de>
Tue, 6 Mar 2012 22:18:54 +0000 (23:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Mar 2012 19:31:24 +0000 (12:31 -0700)
commit8ab46fc85e924390c6e8a941ac7786dc10158c05
treec1df43b394757920e77f0fc92b396573eded43d5
parent315e73b400c9a287a53efb5f857d308589674ac5
genirq: Clear action->thread_mask if IRQ_ONESHOT is not set

commit 52abb700e16a9aa4cbc03f3d7f80206cbbc80680 upstream.

Xommit ac5637611(genirq: Unmask oneshot irqs when thread was not woken)
fails to unmask when a !IRQ_ONESHOT threaded handler is handled by
handle_level_irq.

This happens because thread_mask is or'ed unconditionally in
irq_wake_thread(), but for !IRQ_ONESHOT interrupts never cleared.  So
the check for !desc->thread_active fails and keeps the interrupt
disabled.

Keep the thread_mask zero for !IRQ_ONESHOT interrupts.

Document the thread_mask magic while at it.

Reported-and-tested-by: Sven Joachim <svenjoac@gmx.de>
Reported-and-tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/irq/manage.c