All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Fix uninitialized return code
@ 2012-12-02  9:58 Jan Kiszka
  2012-12-02 10:04 ` [PATCH v2] " Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2012-12-02  9:58 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov; +Cc: kvm, Guo Chao

From: Jan Kiszka <jan.kiszka@siemens.com>

This is a regression caused by 18595411a7.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 arch/x86/kvm/x86.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b0b8abe..04ced33 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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));
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] KVM: x86: Fix uninitialized return code
  2012-12-02  9:58 [PATCH] KVM: x86: Fix uninitialized return code Jan Kiszka
@ 2012-12-02 10:04 ` Jan Kiszka
  2012-12-02 15:38   ` Gleb Natapov
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2012-12-02 10:04 UTC (permalink / raw)
  To: Marcelo Tosatti, Gleb Natapov; +Cc: kvm, Guo Chao

From: Jan Kiszka <jan.kiszka@siemens.com>

This is a regression caused by 18595411a7.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

Sorry, copy&pasted wrong error code.

 arch/x86/kvm/x86.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b0b8abe..3bdaf29 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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));
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] KVM: x86: Fix uninitialized return code
  2012-12-02 10:04 ` [PATCH v2] " Jan Kiszka
@ 2012-12-02 15:38   ` Gleb Natapov
  0 siblings, 0 replies; 3+ messages in thread
From: Gleb Natapov @ 2012-12-02 15:38 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Marcelo Tosatti, kvm, Guo Chao

On Sun, Dec 02, 2012 at 11:04:14AM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> This is a regression caused by 18595411a7.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Applied, thanks.

> ---
> 
> Sorry, copy&pasted wrong error code.
> 
>  arch/x86/kvm/x86.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index b0b8abe..3bdaf29 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -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));
> -- 
> 1.7.3.4

--
			Gleb.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-02 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-02  9:58 [PATCH] KVM: x86: Fix uninitialized return code Jan Kiszka
2012-12-02 10:04 ` [PATCH v2] " Jan Kiszka
2012-12-02 15:38   ` Gleb Natapov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.