dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Konrad Rzeszutek Wilk 2011-09-29 13:31:21 -04:00
parent a102a9ece5
commit 9d093e2958
1 changed files with 1 additions and 0 deletions

View File

@ -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;