Skip to contentSkip to conversation

Patch "sc16is7xx: Drop bogus use of IRQF_ONESHOT" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jan 6, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

sc16is7xx: Drop bogus use of IRQF_ONESHOT

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
sc16is7xx-drop-bogus-use-of-irqf_oneshot.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 04da73803c05dc1150ccc31cbf93e8cd56679c09 Mon Sep 17 00:00:00 2001

From: Josh Cartwright <[email protected]>
Date: Thu, 13 Oct 2016 10:44:33 -0500
Subject: sc16is7xx: Drop bogus use of IRQF_ONESHOT

From: Josh Cartwright <[email protected]>

commit 04da73803c05dc1150ccc31cbf93e8cd56679c09 upstream.

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 9e6f4ca3e567 ("sc16is7xx: use kthread_worker for tx_work and irq")
Cc Jakub Kicinski <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
---
 drivers/tty/serial/sc16is7xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/sc16is7xx.c +1 -1
@@ -1264,7 +1264,7 @@ static int sc16is7xx_probe(struct device
 
 	/* Setup interrupt */
 	ret = devm_request_irq(dev, irq, sc16is7xx_irq,
-			       IRQF_ONESHOT | flags, dev_name(dev), s);
+			       flags, dev_name(dev), s);
 	if (!ret)
 		return 0;
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/sc16is7xx-drop-bogus-use-of-irqf_oneshot.patch