From: tip-bot for Cyrill Gorcunov <gorcunov@openvz.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
gorcunov@openvz.org, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/apic] x86, ioapic: Throw BUG instead of NULL dereference
Date: Wed, 5 Aug 2009 10:55:14 GMT [thread overview]
Message-ID: <tip-a7428cd2ef77734465e36bceb43290e37e2a97c6@git.kernel.org> (raw)
In-Reply-To: <20090801075435.769301745@openvz.org>
Commit-ID: a7428cd2ef77734465e36bceb43290e37e2a97c6
Gitweb: http://git.kernel.org/tip/a7428cd2ef77734465e36bceb43290e37e2a97c6
Author: Cyrill Gorcunov <gorcunov@openvz.org>
AuthorDate: Sat, 1 Aug 2009 11:48:00 +0400
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 5 Aug 2009 10:30:50 +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@openvz.org>
Cc: yinghai@kernel.org
LKML-Reference: <20090801075435.769301745@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.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;
prev parent reply other threads:[~2009-08-05 10:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 7:47 [rfc 0/2] x86,ioapic simplification,bugfix Cyrill Gorcunov
2009-08-01 7:47 ` [rfc 1/2] x86,ioapic: introduce for_each_irq_pin helper Cyrill Gorcunov
2009-08-04 14:11 ` Ingo Molnar
2009-08-04 14:16 ` [tip:x86/apic] x86, ioapic: Introduce for_each_irq_pin() helper tip-bot for Cyrill Gorcunov
2009-08-05 10:55 ` tip-bot for Cyrill Gorcunov
2009-08-01 7:48 ` [rfc 2/2] x86,ioapic: throw BUG instead of NULL dereference Cyrill Gorcunov
2009-08-04 14:16 ` [tip:x86/apic] x86, ioapic: Throw " tip-bot for Cyrill Gorcunov
2009-08-05 10:55 ` tip-bot for Cyrill Gorcunov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-a7428cd2ef77734465e36bceb43290e37e2a97c6@git.kernel.org \
--to=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.