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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1609222359510.5640@nanos>
Date:   Fri, 23 Sep 2016 00:03:36 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Leo Li <pku.leo@...il.com>
cc:     Marc Zyngier <marc.zyngier@....com>,
        Marc Zyngier <maz@...terjones.org>,
        lkml <linux-kernel@...r.kernel.org>
Subject: Re: recommended use of request_any_context_irq()

Leo,

On Thu, 22 Sep 2016, Leo Li wrote:
> core code.  And my concerns is that there are other drivers can hit
> the same problem if connected to the threaded interrupt controller.
> What can we do prevent similar problem in the future?

The simplest way is to be more informative in the failure case. See patch
below.

Converting drivers is surely something which can be done, but I wouldn't
try to do a wholesale conversion blindly.

Thanks,

	tglx

8<----------------

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 73a2b786b5e9..605915f689b4 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1146,6 +1146,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
 	nested = irq_settings_is_nested_thread(desc);
 	if (nested) {
 		if (!new->thread_fn) {
+			pr_warn("IRQ%u is nested, but thread_fn is NULL\n", irq);
 			ret = -EINVAL;
 			goto out_mput;
 		}
@@ -1158,8 +1159,10 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
 	} else {
 		if (irq_settings_can_thread(desc)) {
 			ret = irq_setup_forced_threading(new);
-			if (ret)
+			if (ret) {
+				pr_warn("IRQ%u failed to setup thread\n", irq);
 				goto out_mput;
+			}
 		}
 	}
 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ