summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-09-29 13:31:21 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-10-19 17:03:25 -0400
commit9d093e2958baf76154d1008339f594f798a52790 (patch)
tree3985f2342453fce2c0a49a67b87aff6e357c79e2 /drivers/xen
parenta102a9ece5489e1718cd7543aa079082450ac3a2 (diff)
downloadblackbird-op-linux-9d093e2958baf76154d1008339f594f798a52790.tar.gz
blackbird-op-linux-9d093e2958baf76154d1008339f594f798a52790.zip
xen/events: BUG() when we can't allocate our event->irq array.
In case we can't allocate we are doomed. We should BUG_ON instead of trying to dereference it later on. Acked-by: Ian Campbell <ian.campbell@citrix.com> [v1: Use BUG_ON instead of BUG] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/events.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 7523719bf8a4..6b002cca1f5a 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -1670,6 +1670,7 @@ void __init xen_init_IRQ(void)
evtchn_to_irq = kcalloc(NR_EVENT_CHANNELS, sizeof(*evtchn_to_irq),
GFP_KERNEL);
+ BUG_ON(!evtchn_to_irq);
for (i = 0; i < NR_EVENT_CHANNELS; i++)
evtchn_to_irq[i] = -1;
OpenPOWER on IntegriCloud