|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 4/9] xen/events: BUG() when we can't allocate our
On Thu, 2011-09-29 at 20:52 +0100, Konrad Rzeszutek Wilk wrote:
> In case we can't allocate we are doomed. We should BUG_ON
> instead of trying to dereference it later on.
>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> ---
> drivers/xen/events.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> index 7523719..5db04bf 100644
> --- a/drivers/xen/events.c
> +++ b/drivers/xen/events.c
> @@ -1670,6 +1670,8 @@ void __init xen_init_IRQ(void)
>
> evtchn_to_irq = kcalloc(NR_EVENT_CHANNELS, sizeof(*evtchn_to_irq),
> GFP_KERNEL);
> + if (!evtchn_to_irq)
> + BUG();
AKA
BUG_ON(!evtchn_to_irq);
but
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] Xen bug-fixes for 3.2 (v1), Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 3/9] xen/pciback: Check if the device is found instead of blindly assuming so., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 1/9] xen/pciback: Do not dereference psdev during printk when it is NULL., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 4/9] xen/events: BUG() when we can't allocate our event->irq array., Konrad Rzeszutek Wilk
- Re: [Xen-devel] [PATCH 4/9] xen/events: BUG() when we can't allocate our event->irq array.,
Ian Campbell <=
- [Xen-devel] [PATCH 2/9] xen/pciback: Return proper error code from sscanf., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 9/9] xen/p2m/debugfs: Fix potential pointer exception., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 6/9] xen/irq: If we fail during msi_capability_init return proper error code., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 5/9] xen/events: Don't check the info for NULL as it is already done., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 7/9] xen/xenbus: Check before dereferencing it., Konrad Rzeszutek Wilk
- [Xen-devel] [PATCH 8/9] xen/enlighten: Fix compile warnings., Konrad Rzeszutek Wilk
|
|
|
|
|