[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v1 1/2] xen/arm: vgic: Check for vgic handler to be initialized before dereferencing it
From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> Since domain_vgic_free() can be called when the vgic_ops haven't been initialised yet, always check that d->arch.vgic.handler is not a null. Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> --- xen/arch/arm/vgic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 7a4e3cd..6cf947c 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -187,7 +187,8 @@ void domain_vgic_free(struct domain *d) } } - d->arch.vgic.handler->domain_free(d); + if ( d->arch.vgic.handler ) + d->arch.vgic.handler->domain_free(d); xfree(d->arch.vgic.shared_irqs); xfree(d->arch.vgic.pending_irqs); xfree(d->arch.vgic.allocated_irqs); -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |