Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 150009e2 authored by Marc Zyngier's avatar Marc Zyngier Committed by Christoffer Dall
Browse files

KVM: arm/arm64: vgic-irqfd: Fix MSI entry allocation



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: 95b110ab ("KVM: arm/arm64: Enable irqchip routing")
Cc: stable@vger.kernel.org # 4.8
Reported-by: default avatarAKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent 285a90e3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;