• Thomas Gleixner's avatar
    genirq: Make force irq threading setup more robust · d1f0301b
    Thomas Gleixner authored
    The support of force threading interrupts which are set up with both a
    primary and a threaded handler wreckaged the setup of regular requested
    threaded interrupts (primary handler == NULL).
    
    The reason is that it does not check whether the primary handler is set to
    the default handler which wakes the handler thread. Instead it replaces the
    thread handler with the primary handler as it would do with force threaded
    interrupts which have been requested via request_irq(). So both the primary
    and the thread handler become the same which then triggers the warnon that
    the thread handler tries to wakeup a not configured secondary thread.
    
    Fortunately this only happens when the driver omits the IRQF_ONESHOT flag
    when requesting the threaded interrupt, which is normaly caught by the
    sanity checks when force irq threading is disabled.
    
    Fix it by skipping the force threading setup when a regular threaded
    interrupt is requested. As a consequence the interrupt request which lacks
    the IRQ_ONESHOT flag is rejected correctly instead of silently wreckaging
    it.
    
    Fixes: 2a1d3ab8 ("genirq: Handle force threading of irqs with primary and thread handler")
    Reported-by: default avatarKurt Kanzenbach <kurt.kanzenbach@linutronix.de>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Tested-by: default avatarKurt Kanzenbach <kurt.kanzenbach@linutronix.de>
    Cc: stable@vger.kernel.org
    d1f0301b
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
affinity.c Loading commit data...
autoprobe.c Loading commit data...
chip.c Loading commit data...
cpuhotplug.c Loading commit data...
debug.h Loading commit data...
debugfs.c Loading commit data...
devres.c Loading commit data...
dummychip.c Loading commit data...
generic-chip.c Loading commit data...
handle.c Loading commit data...
internals.h Loading commit data...
ipi.c Loading commit data...
irq_sim.c Loading commit data...
irqdesc.c Loading commit data...
irqdomain.c Loading commit data...
manage.c Loading commit data...
matrix.c Loading commit data...
migration.c Loading commit data...
msi.c Loading commit data...
pm.c Loading commit data...
proc.c Loading commit data...
resend.c Loading commit data...
settings.h Loading commit data...
spurious.c Loading commit data...
timings.c Loading commit data...