Skip to content

Commit 2b097e9

Browse files
committed
Merge tag 'kvm-arm-for-4.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
KVM/ARM fixes for 4.5-rc7 - Fix ioctl error handling on the timer path
2 parents 70e4da7 + 4cad67f commit 2b097e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm/kvm/guest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
161161
u64 val;
162162

163163
val = kvm_arm_timer_get_reg(vcpu, reg->id);
164-
return copy_to_user(uaddr, &val, KVM_REG_SIZE(reg->id));
164+
return copy_to_user(uaddr, &val, KVM_REG_SIZE(reg->id)) ? -EFAULT : 0;
165165
}
166166

167167
static unsigned long num_core_regs(void)

arch/arm64/kvm/guest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
194194
u64 val;
195195

196196
val = kvm_arm_timer_get_reg(vcpu, reg->id);
197-
return copy_to_user(uaddr, &val, KVM_REG_SIZE(reg->id));
197+
return copy_to_user(uaddr, &val, KVM_REG_SIZE(reg->id)) ? -EFAULT : 0;
198198
}
199199

200200
/**

0 commit comments

Comments
 (0)