[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.8] xen/arm: vgic: Check for vgic handler to be initialized before dereferencing it
commit ee24b2f7f0e5ad81799fb1e1728d90bc3bc3f6da Author: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx> AuthorDate: Mon Aug 28 20:32:25 2017 +0300 Commit: Stefano Stabellini <sstabellini@xxxxxxxxxx> CommitDate: Thu Jan 11 12:26:27 2018 -0800 xen/arm: vgic: Check for vgic handler to be initialized before dereferencing it 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> Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> (cherry picked from commit b1f1e492cd4231a1e9feedb7a35c62c063f7c510) --- 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 7884d1c..ce3830b 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -182,7 +182,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); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.8 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |