Skip to contentSkip to conversation

KVM: x86: Fix uninitialized return code

PATCH Superseded Jan Kiszka 2 participants 3 messages Dec 2, 2012

Subsystems (3)
lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 KVM: x86: Fix uninitialized return code

From: Jan Kiszka <[email protected]>

This is a regression caused by 18595411a7.

---
 arch/x86/kvm/x86.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kvm/x86.c +1 -0
index b0b8abe..04ced33 100644
@@ -3006,6 +3006,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
 		break;
 	}
 	case KVM_SET_LAPIC: {
+		r = -EFAULT;
 		if (!vcpu->arch.apic)
 			goto out;
 		u.lapic = memdup_user(argp, sizeof(*u.lapic));
Signature · 1 line
1.7.3.4
author
#1 lore raw

PATCH v2 1/1 KVM: x86: Fix uninitialized return code

From: Jan Kiszka <[email protected]>

This is a regression caused by 18595411a7.

---

Sorry, copy&pasted wrong error code.

 arch/x86/kvm/x86.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kvm/x86.c +1 -0
index b0b8abe..3bdaf29 100644
@@ -3006,6 +3006,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
 		break;
 	}
 	case KVM_SET_LAPIC: {
+		r = -EINVAL;
 		if (!vcpu->arch.apic)
 			goto out;
 		u.lapic = memdup_user(argp, sizeof(*u.lapic));
Signature · 1 line
1.7.3.4
Applied
#2 lore raw
Quoted 5 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

This is a regression caused by 18595411a7.

Applied, thanks.

Quoted 21 lines

---

Sorry, copy&pasted wrong error code.

 arch/x86/kvm/x86.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kvm/x86.c +1 -0
index b0b8abe..3bdaf29 100644
@@ -3006,6 +3006,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
 		break;
 	}
 	case KVM_SET_LAPIC: {
+		r = -EINVAL;
 		if (!vcpu->arch.apic)
 			goto out;
 		u.lapic = memdup_user(argp, sizeof(*u.lapic));
Signature · 1 line
1.7.3.4

--
Gleb.