lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue,  3 Mar 2015 13:22:17 +0100
From:	Valentin Rothberg <Valentin.Rothberg@...6.fr>
To:	tglx@...utronix.de, linux-kernel@...r.kernel.org
Cc:	Valentin Rothberg <Valentin.Rothberg@...6.fr>
Subject: [PATCH] request_any_context_irq(): set IRQF_ONESHOT flag to ensure IRQ request

Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

Signed-off-by: Valentin Rothberg <Valentin.Rothberg@...6.fr>
---
The function has been added by commit ae731f8d ("genirq: Introduce
request_any_context_irq()"), so before "Reject bogus threaded irq
requests".  LXR gives me less than a dozen of references on this
function, so it's likely that this code path has not been executed for
a longer while.
---
 kernel/irq/manage.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index c0a1100..76a1610 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1597,7 +1597,8 @@ 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;
 	}
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ