[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1322050407-12234-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Date: Wed, 23 Nov 2011 12:13:27 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Jamie Iles <jamie@...ieiles.com>
Cc: linux-kernel@...r.kernel.org, patches@...nsource.wolfsonmicro.com,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH] irq: Fix possible null pointer dereference on domains with no ops
It is optional for irqdomains to have operations so we need to check for
their presence before dereferencing them when looking for dt_translate().
Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
---
kernel/irq/irqdomain.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 200ce83..b22a641 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -89,7 +89,7 @@ unsigned int irq_create_of_mapping(struct device_node *controller,
/* Find a domain which can translate the irq spec */
mutex_lock(&irq_domain_mutex);
list_for_each_entry(domain, &irq_domain_list, list) {
- if (!domain->ops->dt_translate)
+ if (!domain->ops || !domain->ops->dt_translate)
continue;
rc = domain->ops->dt_translate(domain, controller,
intspec, intsize, &hwirq, &type);
--
1.7.7.3
--
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