Skip to content

Commit b9fb1fc

Browse files
committed
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fix from Thomas Gleixner: "A single bugfix for the irq core to prevent silent data corruption and malfunction of threaded interrupts under certain conditions" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Make force irq threading setup more robust
2 parents 212dab0 + d1f0301 commit b9fb1fc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

kernel/irq/manage.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,14 +1068,21 @@ static int irq_setup_forced_threading(struct irqaction *new)
10681068
if (new->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT))
10691069
return 0;
10701070

1071+
/*
1072+
* No further action required for interrupts which are requested as
1073+
* threaded interrupts already
1074+
*/
1075+
if (new->handler == irq_default_primary_handler)
1076+
return 0;
1077+
10711078
new->flags |= IRQF_ONESHOT;
10721079

10731080
/*
10741081
* Handle the case where we have a real primary handler and a
10751082
* thread handler. We force thread them as well by creating a
10761083
* secondary action.
10771084
*/
1078-
if (new->handler != irq_default_primary_handler && new->thread_fn) {
1085+
if (new->handler && new->thread_fn) {
10791086
/* Allocate the secondary action */
10801087
new->secondary = kzalloc(sizeof(struct irqaction), GFP_KERNEL);
10811088
if (!new->secondary)

0 commit comments

Comments
 (0)