Skip to contentSkip to conversation

irq: Fix missing IRQF_ONESHOT as only threaded handler

PATCH In review [email protected] 2 participants 2 messages Apr 13, 2021 – Apr 16, 2021 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irq: Fix missing IRQF_ONESHOT as only threaded handler

From: Guangqing Zhu <[email protected]>

Coccinelle noticed:
kernel/irq/manage.c:2199:8-28: ERROR: Threaded IRQ with no primary
handler requested without IRQF_ONESHOT.

---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +1 -1
index 4c14356543d9..222816750048 100644
@@ -2197,7 +2197,7 @@ int request_any_context_irq(unsigned int irq, irq_handler_t handler,
 
 	if (irq_settings_is_nested_thread(desc)) {
 		ret = request_threaded_irq(irq, NULL, handler,
-					   flags, name, dev_id);
+					   flags | IRQF_ONESHOT, name, dev_id);
 		return !ret ? IRQC_IS_NESTED : ret;
 	}
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 17 lines · On Tue, 13 Apr 2021 at 15:42, <[email protected]> wrote:

From: Guangqing Zhu <[email protected]>

Coccinelle noticed:
kernel/irq/manage.c:2199:8-28: ERROR: Threaded IRQ with no primary
handler requested without IRQF_ONESHOT.

---
 kernel/irq/manage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/irq/manage.c +0 -0
index 4c14356543d9..222816750048 100644

kernel/irq/manage.c int request_any_context_irq(unsigned int irq, irq_handler_t handler, · line 2200

Quoted 5 lines
kernel/irq/manage.c +1 -1
@@ -2197,7 +2197,7 @@ int request_any_context_irq(unsigned int irq, irq_handler_t handler,
 
        if (irq_settings_is_nested_thread(desc)) {
                ret = request_threaded_irq(irq, NULL, handler,
-                                          flags, name, dev_id);
+                                          flags | IRQF_ONESHOT, name, dev_id);

This is a core IRQ code... and you clearly see here a nested IRQ. Please, stop sending automated coccinelle patches.

Best regards,
Krzysztof