From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yang, Sheng" Subject: [PATCH] KVM: Fix wrong KVM_GET_LAPIC Date: Mon, 18 Aug 2008 11:15:40 +0800 Message-ID: <200808181115.40534.sheng.yang@intel.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_clOqIy77Ad1Ovgy" Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mga02.intel.com ([134.134.136.20]:22461 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751149AbYHRDNr (ORCPT ); Sun, 17 Aug 2008 23:13:47 -0400 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: --Boundary-00=_clOqIy77Ad1Ovgy Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =46rom a8ca7dd8f5fe0125e7b7d0a21f5caddacd754911 Mon Sep 17 00:00:00 2001 =46rom: Sheng Yang Date: Mon, 18 Aug 2008 11:04:22 +0800 Subject: [PATCH] KVM: Fix wrong KVM_GET_LAPIC Which caused migration fail in recent commits. Signed-off-by: Sheng Yang =2D-- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ee005a6..4a03375 100644 =2D-- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1555,7 +1555,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, if (r) goto out; r =3D -EFAULT; =2D if (copy_to_user(argp, &lapic, sizeof lapic)) + if (copy_to_user(argp, lapic, sizeof(struct kvm_lapic_state))) goto out; r =3D 0; break; =2D- 1.5.4.5 --Boundary-00=_clOqIy77Ad1Ovgy Content-Type: text/x-diff; charset="us-ascii"; name="0001-KVM-Fix-wrong-KVM_GET_LAPIC.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-KVM-Fix-wrong-KVM_GET_LAPIC.patch" =46rom a8ca7dd8f5fe0125e7b7d0a21f5caddacd754911 Mon Sep 17 00:00:00 2001 =46rom: Sheng Yang Date: Mon, 18 Aug 2008 11:04:22 +0800 Subject: [PATCH] KVM: Fix wrong KVM_GET_LAPIC Which caused migration fail in recent commits. Signed-off-by: Sheng Yang =2D-- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ee005a6..4a03375 100644 =2D-- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1555,7 +1555,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, if (r) goto out; r =3D -EFAULT; =2D if (copy_to_user(argp, &lapic, sizeof lapic)) + if (copy_to_user(argp, lapic, sizeof(struct kvm_lapic_state))) goto out; r =3D 0; break; =2D-=20 1.5.4.5 --Boundary-00=_clOqIy77Ad1Ovgy--