diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2017-11-16 17:58:15 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-14 09:53:01 +0100 |
commit | af85c1e04ec5737d595a9b4d0af0ef72a3ceb23b (patch) | |
tree | a1601bc782e4385176db321db70194ee3dcad0fb /virt | |
parent | 73c4af9627c0914b81832e162deb34f4894760cb (diff) | |
download | linux-exynos-af85c1e04ec5737d595a9b4d0af0ef72a3ceb23b.tar.gz linux-exynos-af85c1e04ec5737d595a9b4d0af0ef72a3ceb23b.tar.bz2 linux-exynos-af85c1e04ec5737d595a9b4d0af0ef72a3ceb23b.zip |
KVM: arm/arm64: vgic-irqfd: Fix MSI entry allocation
commit 150009e2c70cc3c6e97f00e7595055765d32fb85 upstream.
Using the size of the structure we're allocating is a good idea
and avoids any surprise... In this case, we're happilly confusing
kvm_kernel_irq_routing_entry and kvm_irq_routing_entry...
Fixes: 95b110ab9a09 ("KVM: arm/arm64: Enable irqchip routing")
Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/arm/vgic/vgic-irqfd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/virt/kvm/arm/vgic/vgic-irqfd.c b/virt/kvm/arm/vgic/vgic-irqfd.c index b7baf581611a..99e026d2dade 100644 --- a/virt/kvm/arm/vgic/vgic-irqfd.c +++ b/virt/kvm/arm/vgic/vgic-irqfd.c @@ -112,8 +112,7 @@ int kvm_vgic_setup_default_irq_routing(struct kvm *kvm) u32 nr = dist->nr_spis; int i, ret; - entries = kcalloc(nr, sizeof(struct kvm_kernel_irq_routing_entry), - GFP_KERNEL); + entries = kcalloc(nr, sizeof(*entries), GFP_KERNEL); if (!entries) return -ENOMEM; |