提交 9d093e29 编写于 作者: K Konrad Rzeszutek Wilk

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: NIan Campbell <ian.campbell@citrix.com>
[v1: Use BUG_ON instead of BUG]
Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 a102a9ec
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册