aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm/kvm-ia64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kvm/kvm-ia64.c')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 7f3c0a2e60cd..d5f4e9161201 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -979,11 +979,13 @@ long kvm_arch_vm_ioctl(struct file *filp,
979 r = -EFAULT; 979 r = -EFAULT;
980 if (copy_from_user(&irq_event, argp, sizeof irq_event)) 980 if (copy_from_user(&irq_event, argp, sizeof irq_event))
981 goto out; 981 goto out;
982 r = -ENXIO;
982 if (irqchip_in_kernel(kvm)) { 983 if (irqchip_in_kernel(kvm)) {
983 __s32 status; 984 __s32 status;
984 status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 985 status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID,
985 irq_event.irq, irq_event.level); 986 irq_event.irq, irq_event.level);
986 if (ioctl == KVM_IRQ_LINE_STATUS) { 987 if (ioctl == KVM_IRQ_LINE_STATUS) {
988 r = -EFAULT;
987 irq_event.status = status; 989 irq_event.status = status;
988 if (copy_to_user(argp, &irq_event, 990 if (copy_to_user(argp, &irq_event,
989 sizeof irq_event)) 991 sizeof irq_event))
@@ -1379,7 +1381,7 @@ static void kvm_release_vm_pages(struct kvm *kvm)
1379 int i, j; 1381 int i, j;
1380 unsigned long base_gfn; 1382 unsigned long base_gfn;
1381 1383
1382 slots = rcu_dereference(kvm->memslots); 1384 slots = kvm_memslots(kvm);
1383 for (i = 0; i < slots->nmemslots; i++) { 1385 for (i = 0; i < slots->nmemslots; i++) {
1384 memslot = &slots->memslots[i]; 1386 memslot = &slots->memslots[i];
1385 base_gfn = memslot->base_gfn; 1387 base_gfn = memslot->base_gfn;
@@ -1535,8 +1537,10 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
1535 goto out; 1537 goto out;
1536 1538
1537 if (copy_to_user(user_stack, stack, 1539 if (copy_to_user(user_stack, stack,
1538 sizeof(struct kvm_ia64_vcpu_stack))) 1540 sizeof(struct kvm_ia64_vcpu_stack))) {
1541 r = -EFAULT;
1539 goto out; 1542 goto out;
1543 }
1540 1544
1541 break; 1545 break;
1542 } 1546 }