• Thomas Gleixner's avatar
    genirq: Disable the SHIRQ_DEBUG call in request_threaded_irq for now · 6d83f94d
    Thomas Gleixner authored
    With CONFIG_SHIRQ_DEBUG=y we call a newly installed interrupt handler
    in request_threaded_irq().
    
    The original implementation (commit a304e1b8) called the handler
    _BEFORE_ it was installed, but that caused problems with handlers
    calling disable_irq_nosync(). See commit 377bf1e4.
    
    It's braindead in the first place to call disable_irq_nosync in shared
    handlers, but ....
    
    Moving this call after we installed the handler looks innocent, but it
    is very subtle broken on SMP.
    
    Interrupt handlers rely on the fact, that the irq core prevents
    reentrancy.
    
    Now this debug call violates that promise because we run the handler
    w/o the IRQ_INPROGRESS protection - which we cannot apply here because
    that would result in a possibly forever masked interrupt line.
    
    A concurrent real hardware interrupt on a different CPU results in
    handler reentrancy and can lead to complete wreckage, which was
    unfortunately observed in reality and took a fricking long time to
    debug.
    
    Leave the code here for now. We want this debug feature, but that's
    not easy to fix. We really should get rid of those
    disable_irq_nosync() abusers and remove that function completely.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: Arjan van de Ven <arjan@infradead.org>
    Cc: stable@kernel.org # .28 -> .37
    6d83f94d
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
autoprobe.c Loading commit data...
chip.c Loading commit data...
devres.c Loading commit data...
dummychip.c Loading commit data...
handle.c Loading commit data...
internals.h Loading commit data...
irqdesc.c Loading commit data...
manage.c Loading commit data...
migration.c Loading commit data...
pm.c Loading commit data...
proc.c Loading commit data...
resend.c Loading commit data...
spurious.c Loading commit data...