summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-04-22 17:08:12 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-04-22 17:08:12 +0200
commit2fa462f826210bbec65f8ed06d5ef4e0cd4f5450 (patch)
treeed21793f915d77bcfb8c8a5e6cd07412c735b5fd /virt
parentMerge tag 'signed-kvm-ppc-queue' of git://github.com/agraf/linux-2.6 into kvm... (diff)
parentKVM: arm/arm64: check IRQ number on userland injection (diff)
downloadlinux-2fa462f826210bbec65f8ed06d5ef4e0cd4f5450.tar.xz
linux-2fa462f826210bbec65f8ed06d5ef4e0cd4f5450.zip
Merge tag 'kvm-arm-for-4.1-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
KVM/ARM changes for v4.1, take #2: Rather small this time: - a fix for a nasty bug with virtual IRQ injection - a fix for irqfd
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/arm/vgic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 8d550ff14700..78fb8201014f 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1561,6 +1561,9 @@ int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int irq_num,
goto out;
}
+ if (irq_num >= kvm->arch.vgic.nr_irqs)
+ return -EINVAL;
+
vcpu_id = vgic_update_irq_pending(kvm, cpuid, irq_num, level);
if (vcpu_id >= 0) {
/* kick the specified vcpu */
@@ -2141,7 +2144,7 @@ int kvm_irq_map_gsi(struct kvm *kvm,
struct kvm_kernel_irq_routing_entry *entries,
int gsi)
{
- return gsi;
+ return 0;
}
int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin)