[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1316554589-24393-1-git-send-email-bigeasy@linutronix.de>
Date: Tue, 20 Sep 2011 23:36:29 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-kernel@...r.kernel.org,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Grant Likely <grant.likely@...retlab.ca>
Subject: [PATCH] irq/irqdomain: change bail out condition for irq_domain_add()
I tried to convert x86 to this infrastructure and I run into
|BUG: unable to handle kernel NULL pointer dereference at 00000014
(d || d->domain) is kinda bogus because if d is NULL it will check for
d->domain which should fail. It seems that the code needs the irq_data
to be present and there should be no irq_domain set yet. This patch does
this.
My convert to this infrastructure still does not work with this patch
but I have enough for today.
Cc: Grant Likely <grant.likely@...retlab.ca>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
---
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 d5828da..213089b 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -29,7 +29,7 @@ void irq_domain_add(struct irq_domain *domain)
*/
for (hwirq = 0; hwirq < domain->nr_irq; hwirq++) {
d = irq_get_irq_data(irq_domain_to_irq(domain, hwirq));
- if (d || d->domain) {
+ if (!d || d->domain) {
/* things are broken; just report, don't clean up */
WARN(1, "error: irq_desc already assigned to a domain");
return;
--
1.7.6.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