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
| ||
|
Date: Fri, 15 Jun 2012 23:01:30 -0600 From: Grant Likely <grant.likely@...retlab.ca> To: linux-kernel@...r.kernel.org Cc: Milton Miller <miltonm@....com>, Grant Likely <grant.likely@...retlab.ca>, Paul Mundt <lethal@...ux-sh.org>, Benjamin Herrenschmidt <benh@...nel.crashing.org>, Thomas Gleixner <tglx@...utronix.de>, Rob Herring <rob.herring@...xeda.com> Subject: [PATCH 05/12] irqdomain: Fix irq_create_direct_mapping() to test irq_domain type. irq_create_direct_mapping can only be used with the NOMAP type. Make the function test to ensure it is passed the correct type of irq_domain. Signed-off-by: Grant Likely <grant.likely@...retlab.ca> Cc: Paul Mundt <lethal@...ux-sh.org> Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org> Cc: Thomas Gleixner <tglx@...utronix.de> Cc: Rob Herring <rob.herring@...xeda.com> --- kernel/irq/irqdomain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 79a7711..0483e27 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -447,8 +447,8 @@ unsigned int irq_create_direct_mapping(struct irq_domain *domain) if (domain == NULL) domain = irq_default_domain; - BUG_ON(domain == NULL); - WARN_ON(domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP); + if (WARN_ON(!domain || domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP)) + return 0; virq = irq_alloc_desc_from(1, of_node_to_nid(domain->of_node)); if (!virq) { -- 1.7.9.5 -- 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