• Josh Cartwright's avatar
    sc16is7xx: Drop bogus use of IRQF_ONESHOT · 04da7380
    Josh Cartwright authored
    The use of IRQF_ONESHOT when registering an interrupt handler with
    request_irq() is non-sensical.
    
    Not only that, it also prevents the handler from being threaded when it
    otherwise should be w/ IRQ_FORCED_THREADING is enabled.  This causes the
    following deadlock observed by Sean Nyekjaer on -rt:
    
    Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    [..]
       rt_spin_lock_slowlock from queue_kthread_work
       queue_kthread_work from sc16is7xx_irq
       sc16is7xx_irq [sc16is7xx] from handle_irq_event_percpu
       handle_irq_event_percpu from handle_irq_event
       handle_irq_event from handle_level_irq
       handle_level_irq from generic_handle_irq
       generic_handle_irq from mxc_gpio_irq_handler
       mxc_gpio_irq_handler from mx3_gpio_irq_handler
       mx3_gpio_irq_handler from generic_handle_irq
       generic_handle_irq from __handle_domain_irq
       __handle_domain_irq from gic_handle_irq
       gic_handle_irq from __irq_svc
       __irq_svc from rt_spin_unlock
       rt_spin_unlock from kthread_worker_fn
       kthread_worker_fn from kthread
       kthread from ret_from_fork
    
    Fixes: 9e6f4ca3 ("sc16is7xx: use kthread_worker for tx_work and irq")
    Reported-by: default avatarSean Nyekjaer <sean.nyekjaer@prevas.dk>
    Signed-off-by: default avatarJosh Cartwright <joshc@ni.com>
    Cc: linux-rt-users@vger.kernel.org
    Cc: Jakub Kicinski <moorray3@wp.pl>
    Cc: stable@vger.kernel.org
    Cc: linux-serial@vger.kernel.org
    Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: default avatarJulia Cartwright <julia@ni.com>
    Acked-by: default avatarJakub Kicinski <kubakici@wp.pl>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    04da7380
sc16is7xx.c 42.8 KB