[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-460ba8dfa8decb3885256fc4cbb3d2ee46a6466f@git.kernel.org>
Date: Tue, 4 Aug 2009 14:16:29 GMT
From: tip-bot for Cyrill Gorcunov <gorcunov@...nvz.org>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
gorcunov@...nvz.org, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:x86/apic] x86, ioapic: Throw BUG instead of NULL dereference
Commit-ID: 460ba8dfa8decb3885256fc4cbb3d2ee46a6466f
Gitweb: http://git.kernel.org/tip/460ba8dfa8decb3885256fc4cbb3d2ee46a6466f
Author: Cyrill Gorcunov <gorcunov@...nvz.org>
AuthorDate: Sat, 1 Aug 2009 11:48:00 +0400
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 4 Aug 2009 16:11:54 +0200
x86, ioapic: Throw BUG instead of NULL dereference
Instead of plain NULL deref we better throw error
message with a backtrace. Actually we need more
gracious error handling here. Meanwhile leave it
as is.
Signed-off-by: Cyrill Gorcunov <gorcunov@...nvz.org>
Cc: yinghai@...nel.org
LKML-Reference: <20090801075435.769301745@...nvz.org>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
arch/x86/kernel/apic/io_apic.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index ffd8fdf..2a145d3 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -503,6 +503,10 @@ static void add_pin_to_irq_node(struct irq_cfg *cfg, int node, int apic, int pin
}
entry = get_one_free_irq_2_pin(node);
+ if (!entry) {
+ printk(KERN_ERR "can not alloc irq_pin_list\n");
+ BUG_ON(1);
+ }
entry->apic = apic;
entry->pin = pin;
--
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