Fix unsafe disable_irq usage
cover Fix unsafe disable_irq usage
After being bitten by unsafe usage of disable_irq from within that irq's handler [1], I went through and used Coccinelle to audit the rest of drivers/ too. This turned up 9 more unsafe usages.
As Haavard pointed out in that thread, disable_irq waits for running handlers of an irq to complete before returning. When a handler disable_irq's its own irq then we see a deadlock.
Note that this wasn't actually observed in the wild until the recent merge of
commit 3aa551c9b4c40018f0e261a178e3d25478dc04a9
Author: Thomas Gleixner <[email protected]> Date: Mon Mar 23 18:28:15 2009 +0100
genirq: add threaded interrupt handler support
Add support for threaded interrupt handlers
Regards,
--Ben.
Hi Ben,
Quoted 11 lines · On Wednesday 15 April 2009 22:54:05 Ben Nizette wrote:
After being bitten by unsafe usage of
disable_irqfrom within that irq's handler [1], I went through and used Coccinelle to audit the rest ofdrivers/too. This turned up 9 more unsafe usages.As Haavard pointed out in that thread,
disable_irqwaits for running handlers of an irq to complete before returning. When a handler disable_irq's its own irq then we see a deadlock.Note that this wasn't actually observed in the wild until the recent merge of
Quoted 9 lines
commit
3aa551c9b4c40018f0e261a178e3d25478dc04a9Author: Thomas Gleixner <[email protected]> Date: Mon Mar 23 18:28:15 2009 +0100genirq: add threaded interrupt handler support
Add support for threaded interrupt handlers
Applied all 4 patches affecting input devices, they should show up next time Linus pulls from me. Thank you.
Signature · 1 line
Dmitry